Facebook loggin button on android - android

I try to add a facebook loggin button on my project, but when I test the error log show me this:
FATAL EXCEPTION: main Log in attempt failed: FacebookActivity could not be started. Please make sure you added FacebookActivity to the AndroidManifest.
But I have put the FacebookActivity on the Manifest like below:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gdp.eparking" >
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id"/>
<activity
android:name=".ActivityNuevoUsuario"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<activity android:name=".ActivityLogueo"
android:label="#string/app_name"
android:screenOrientation="portrait">
</activity>
<activity android:name=".ActivityPrincipal"
android:label="#string/app_name"
android:screenOrientation="portrait">
</activity>
<activity android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
android:label="#string/app_name" />
I need others permission?

You are putting your activities outside the application tag, your corrected manifest should be:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.gdp.eparking" >
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id"/>
<activity
android:name=".ActivityNuevoUsuario"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ActivityLogueo"
android:label="#string/app_name"
android:screenOrientation="portrait">
</activity>
<activity android:name=".ActivityPrincipal"
android:label="#string/app_name"
android:screenOrientation="portrait">
</activity>
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
android:label="#string/app_name" />
</application>

Related

Cannot change intent filter in android manifest

I have 3 activities in this android studio project. I'm tasked with starting them each separately by moving the intent filter into the activity, however I'm unable to start one of my activities. The same activity doesn't have a /activity> closing tag and I'm not sure why. Any help would be greatly appreciated.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.sean.lab1">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".StartActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".LoginActivity"
android:label="#string/title_activity_login"
android:theme="#style/AppTheme.NoActionBar" />
<activity android:name=".ListItemsActivity"></activity>
</application>
</manifest>
I am able to move the intent tag to my ListItemsActivity and it will start, but I am not able to move the intent filter tag to my LoginActivity, nor does LoginActivity have a closing </activity> tag.
Here is what you want to do
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".StartActivity">
</activity>
<activity
android:name=".LoginActivity"
android:label="#string/title_activity_login"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ListItemsActivity"></activity>
</application>
Try this.
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".StartActivity"></activity>
<activity
android:name=".LoginActivity"
android:label="#string/title_activity_login"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ListItemsActivity"></activity>
</application>

After app installation I can't open it

I have created an simple app with a few activities. After successful installation I can't open the app. I can just see it in device's apps.
Yes of course a read all the answers telling "You have to set launcher activity". But I set launcher activity.
Here is AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cz.jacon.davodani"
android:versionCode="0"
android:versionName="0.1">
<application
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/Theme">
</application>
<activity
android:name=".activities.MainActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activities.SearchActivity"
android:label="#string/search_activity">
</activity>
<activity
android:name=".activities.CustomerActivity"
android:label="#string/customer_activity">
</activity>
<activity
android:name=".activities.CreditActivity"
android:label="#string/credit_activity">
</activity>
<activity
android:name=".activities.PrintReceiptActivity"
android:label="#string/print_receipt_activity">
</activity>
<activity
android:name=".activities.ProductActivity"
android:label="#string/product_activity">
</activity>
Never before happened to me... Can you give me some advice? Thanks a lot
All your activities are required to be defined within the <application> tag.
<application
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/Theme">
<!-- Add activites here -->
</application>
Your manifest should look like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="cz.jacon.davodani"
android:versionCode="0"
android:versionName="0.1">
<application
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/Theme">
<activity
android:name=".activities.MainActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
...
...
</application>
</manifest>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cz.jacon.davodani"
android:versionCode="0"
android:versionName="0.1">
<application
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/Theme">
<activity
android:name=".activities.MainActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activities.SearchActivity"
android:label="#string/search_activity">
</activity>
<activity
android:name=".activities.CustomerActivity"
android:label="#string/customer_activity">
</activity>
<activity
android:name=".activities.CreditActivity"
android:label="#string/credit_activity">
</activity>
<activity
android:name=".activities.PrintReceiptActivity"
android:label="#string/print_receipt_activity">
</activity>
<activity
android:name=".activities.ProductActivity"
android:label="#string/product_activity">
</activity>
</application>
</manifest>
try Replacing your manifest with this..
Change your AndroidManifest.xml structure to -
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cz.jacon.davodani"
android:versionCode="0"
android:versionName="0.1">
<application
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/Theme">
<activity
android:name=".activities.MainActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activities.SearchActivity"
android:label="#string/search_activity">
</activity>
<activity
android:name=".activities.CustomerActivity"
android:label="#string/customer_activity">
</activity>
<activity
android:name=".activities.CreditActivity"
android:label="#string/credit_activity">
</activity>
<activity
android:name=".activities.PrintReceiptActivity"
android:label="#string/print_receipt_activity">
</activity>
<activity
android:name=".activities.ProductActivity"
android:label="#string/product_activity">
</activity>
</application>
</manifest>
All activities tag must be placed inside <application> tag and it should be placed inside <manifest> tag.

URI is not registered error

I imported facebook sdk successfully. When I tried to run the app, I got this error in my manifest file. I searched for this error's solution but could not find any satisfying solution. So, any help in this regard would be appreciated.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sam.freebies" >
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<provider
android:name="com.facebook.FacebookContentProvider"
android:authorities="com.facebook.app.FacebookContentProvider947785421969944"
android:exported="true" />
<activity android:name="com.sam.freebies.MainActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.sam.freebies.SecondActivity" />
</application>
</manifest>

Google play Supported device 0

I published an application but google play shows me that 0 devices are compatible.
I checked the Manifest but i don't know why.
I tried to change minsdk and targetsdk but the result is the same.
I need help please!
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="it.h2_web.www.agos"
android:versionCode="3"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<application
android:allowBackup="true"
android:icon="#drawable/icona"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<receiver android:name=".services.BootCompletedIntentReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="YouWillNeverKillMe" />
</intent-filter>
</receiver>
<service android:enabled="true" android:name=".services.MyService"></service>
<activity
android:name=".Dashboard"
android:label="#string/app_name"
android:theme="#android:style/Theme.Holo.Light.NoActionBar.Fullscreen"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ImmobiliView"
android:label="#string/app_name"
android:theme="#android:style/Theme.Holo.Light.NoActionBar.Fullscreen"
android:screenOrientation="portrait"
>
</activity>
<activity
android:name=".ClientiView"
android:label="#string/app_name"
android:screenOrientation="portrait"
>
</activity>
<activity
android:name=".ImmobiliList"
android:label="#string/app_name"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".ClientiList"
android:label="#string/app_name"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".LoginView"
android:label="#string/app_name"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".WebActivity"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen"
android:windowSoftInputMode="adjustPan"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".AgendaView"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen">
</activity>
<activity
android:name=".ContactsView"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen">
</activity>
</application>
</manifest>
Refer the below link for solution
Optimizing Android manifest file for largest number of supported devices
http://developer.android.com/guide/topics/manifest/supports-screens-element.html

Android manifest (AndroidManifest.xml) not working as expected

What is the problem in this file ?
it give me error everytime i try to make it work
i need the splash screen to work as normal
then i want the StationList work after it as i try to do when splash is working good the stationlist don't and when stationlist work the splash screen dont
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.webcraftbd.radio"
android:versionCode="7"
android:versionName="#string/version" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="10" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="androiƄd.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".Splash"
android:label="#string/app_name"
android:launchMode="singleInstance"
android:configChanges="orientation|keyboardHidden"
android:theme="#android:style/Theme.Black.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".StationList"
android:configChanges="orientation|keyboardHidden"
android:launchMode="singleInstance"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<service
android:name=".RadioService"
android:enabled="true" />
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="#android:style/Theme.Black.NoTitleBar" ></activity>
<activity
android:name=".FacebookActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="#android:style/Theme.Black" ></activity>
<activity
android:name=".TwitterActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="#android:style/Theme.Black" ></activity>
<activity
android:name=".AboutActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="#android:style/Theme.Black.NoTitleBar" ></activity>
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
</application>
</manifest>
Replace this: android:name=".StationList" in
<activity
android:name=".StationList"
android:configChanges="orientation|keyboardHidden"
android:launchMode="singleInstance"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:label="#string/app_name" >
with the name of your splashscreen activity and add .StationList as a seperate activity like:
<activity
android:name=".StationList"
android:configChanges="orientation|keyboardHidden"
android:theme="#android:style/Theme.Black.NoTitleBar" ></activity>

Categories

Resources