I've tried to add Firebase Cloud Messaging and Google/Firebase Analytics in my Application.
AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.Web"
android:permission="android.permission.RECEIVE_BOOT_COMPLETED"
android:versionCode="26"
android:versionName="1.2.60">
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="24" />
<application
android:name=".AnalyticsTracker"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/MyMaterialTheme">
<activity
android:name="com.example.Login"
android:configChanges="orientation|keyboardHidden"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:exported="false"
android:name=".FirebaseMessage">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<service
android:exported="false"
android:name=".FirebaseInstanceID">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>
</application>
Running Services
Any thoughts what's causing this?
This "MeasurementBrokerService" leaks a lot of memory in my Application for no reason at all. There was a similar post but no solution was found.
I run the latest Google Play Services so nothing is outdated
UPDATED i got the \app\build\intermediates\manifests\full\debug\AndroidManifest.xml
It contains quite a lot "services" and declares, more than the AndroidManifest.xml in the android studio.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.web"
android:versionCode="26"
android:versionName="1.2.60" >
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="24" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission
android:name="com.example.web.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.web.permission.C2D_MESSAGE" />
<application
android:name="com.example.web.AnalyticsTracker"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/MyMaterialTheme" >
<meta-data
android:name="com.samsung.android.sdk.multiwindow.enable"
android:value="true" />
<meta-data
android:name="com.samsung.android.sdk.multiwindow.multiinstance.enable"
android:value="false" />
<meta-data
android:name="com.sec.android.multiwindow.STYLE"
android:value="fixedRatio" />
<meta-data
android:name="com.sec.android.support.multiwindow"
android:value="true" />
<activity
android:name="com.example.web.MainActivity"
android:configChanges="orientation|keyboardHidden"
android:label="#string/app_name" />
<activity
android:name="com.example.web.Login"
android:configChanges="orientation|keyboardHidden"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:name="com.example.web.FirebaseMessage"
android:exported="false" >
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<receiver android:name="com.example.web.Autostart" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
<service
android:name="com.fexample.web.FirebaseInstanceID"
android:exported="false" >
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<activity
android:name="com.google.android.gms.common.api.GoogleApiActivity"
android:exported="false"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<service
android:name="com.google.firebase.messaging.FirebaseMessagingService"
android:exported="true" >
<intent-filter android:priority="-500" >
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.example.web" />
</intent-filter>
</receiver>
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver"
android:exported="false" />
<service
android:name="com.google.firebase.iid.FirebaseInstanceIdService"
android:exported="true" >
<intent-filter android:priority="-500" >
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<provider
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:authorities="com.example.web.firebaseinitprovider"
android:exported="false"
android:initOrder="100" />
<service
android:name="com.google.firebase.crash.internal.service.FirebaseCrashReceiverService"
android:process=":background_crash" />
<service
android:name="com.google.firebase.crash.internal.service.FirebaseCrashSenderService"
android:process=":background_crash" />
<receiver
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="true" >
<intent-filter>
<action android:name="com.google.android.gms.measurement.UPLOAD" />
</intent-filter>
</receiver>
<service
android:name="com.google.android.gms.measurement.AppMeasurementService"
android:enabled="true"
android:exported="false" />
<activity
android:name="com.google.android.gms.appinvite.PreviewActivity"
android:exported="true"
android:theme="#style/Theme.AppInvite.Preview" >
<intent-filter>
<action android:name="com.google.android.gms.appinvite.ACTION_PREVIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent" />
<activity
android:name="com.google.android.gms.ads.purchase.InAppPurchaseActivity"
android:theme="#style/Theme.IAPTheme" />
<activity
android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity"
android:excludeFromRecents="true"
android:exported="false"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<service
android:name="com.google.android.gms.auth.api.signin.RevocationBoundService"
android:exported="true"
android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION" />
</application>
Related
The developers doesn't support application anymore, so login options unavailable. I would like to skip login screen and launch the Application instead. Can I change the Android Manifest in order to do that?
Could anyone help?
The app isn`t available at Google Store anymore, but can be found here: https://www.apk4fun.com/apk/239138/
<?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.searchlike" platformBuildVersionCode="26" platformBuildVersionName="8.0.0">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_PROFILE"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE"/>
<permission android:name="com.searchlike.permission.C2D_MESSAGE" android:protectionLevel="signature"/>
<uses-permission android:name="com.searchlike.permission.C2D_MESSAGE"/>
<uses-permission android:name="com.sec.android.provider.badge.permission.READ"/>
<uses-permission android:name="com.sec.android.provider.badge.permission.WRITE"/>
<uses-permission android:name="com.htc.launcher.permission.READ_SETTINGS"/>
<uses-permission android:name="com.htc.launcher.permission.UPDATE_SHORTCUT"/>
<uses-permission android:name="com.sonyericsson.home.permission.BROADCAST_BADGE"/>
<uses-permission android:name="com.sonymobile.home.permission.PROVIDER_INSERT_BADGE"/>
<uses-permission android:name="com.anddoes.launcher.permission.UPDATE_COUNT"/>
<uses-permission android:name="com.majeur.launcher.permission.UPDATE_BADGE"/>
<uses-permission android:name="com.huawei.android.launcher.permission.CHANGE_BADGE"/>
<uses-permission android:name="com.huawei.android.launcher.permission.READ_SETTINGS"/>
<uses-permission android:name="com.huawei.android.launcher.permission.WRITE_SETTINGS"/>
<uses-permission android:name="android.permission.READ_APP_BADGE"/>
<uses-permission android:name="com.oppo.launcher.permission.READ_SETTINGS"/>
<uses-permission android:name="com.oppo.launcher.permission.WRITE_SETTINGS"/>
<uses-permission android:name="me.everything.badger.permission.BADGE_COUNT_READ"/>
<uses-permission android:name="me.everything.badger.permission.BADGE_COUNT_WRITE"/>
<meta-data android:name="android.support.VERSION" android:value="25.3.1"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<application android:allowBackup="true" android:icon="#mipmap/ic_launcher" android:label="#string/app_name" android:name="com.searchlike.MainApplication" android:resizeableActivity="false" android:supportsRtl="true" android:theme="#style/AppTheme">
<meta-data android:name="io.branch.sdk.BranchKey" android:value="key_live_opyq0ew8g6mMmHYn4ipBeamdutiwNotx"/>
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="#drawable/icon_notification"/>
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="#color/theme_blue"/>
<meta-data android:name="com.google.firebase.messaging.default_notification_channel_id" android:value="#string/default_notification_channel_id"/>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/fb_app_id"/>
<activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize" android:label="#string/app_name" android:name="com.facebook.FacebookActivity" android:theme="#style/com_facebook_activity_theme"/>
<activity android:exported="true" android:name="com.facebook.CustomTabActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="#string/fb_login_protocol_scheme"/>
</intent-filter>
</activity>
<activity android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:label="#string/app_name" android:launchMode="singleTask" android:name="com.searchlike.MainActivity" android:screenOrientation="portrait" android:theme="#style/SplashTheme" android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="com.searchlike.fcmopen"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
<intent-filter>
<data android:host="open" android:scheme="searchlike"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:host="searchlike.app.link" android:scheme="https"/>
<data android:host="searchlike-alternate.app.link" android:scheme="https"/>
<data android:host="searchlike.test-app.link" android:scheme="https"/>
<data android:host="searchlike-alternate.test-app.link" android:scheme="https"/>
<data android:host="m.lzr.ai" android:scheme="https"/>
</intent-filter>
</activity>
<activity android:exported="false" android:name="com.facebook.react.devsupport.DevSettingsActivity"/>
<meta-data android:name="io.fabric.ApiKey" android:value="be5f8dca0dd9bc907c780c5063740e13dafb4a5b"/>
<service android:name="io.invertase.firebase.messaging.RNFirebaseBackgroundMessagingService"/>
<service android:name="io.invertase.firebase.messaging.RNFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<service android:name="io.invertase.firebase.messaging.RNFirebaseInstanceIdService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>
<receiver android:exported="true" android:name="io.branch.referral.InstallListener"/>
<receiver android:exported="true" android:name="com.kochava.base.ReferralReceiver"/>
<receiver android:enabled="true" android:exported="true" android:name="com.androidbroadcastreceiverforreferrer.ReferrerBroadcastReceiver"/>
<receiver android:exported="true" android:name="com.searchlike.ReferrerForwarder">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER"/>
</intent-filter>
</receiver>
<provider android:authorities="com.searchlike.provider" android:exported="false" android:grantUriPermissions="true" android:name="com.imagepicker.FileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="#xml/provider_paths"/>
</provider>
<activity android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:name="com.reactnativenavigation.controllers.NavigationActivity"/>
<service android:exported="true" android:name="com.google.firebase.messaging.FirebaseMessagingService">
<intent-filter android:priority="-500">
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<service android:name="com.google.firebase.components.ComponentDiscoveryService">
<meta-data android:name="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar" android:value="com.google.firebase.components.ComponentRegistrar"/>
<meta-data android:name="com.google.firebase.components:com.google.firebase.iid.Registrar" android:value="com.google.firebase.components.ComponentRegistrar"/>
</service>
<receiver android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementReceiver"/>
<receiver android:enabled="true" android:exported="true" android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver" android:permission="android.permission.INSTALL_PACKAGES">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER"/>
</intent-filter>
</receiver>
<service android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementService"/>
<service android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementJobService" android:permission="android.permission.BIND_JOB_SERVICE"/>
<receiver android:exported="true" android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
<category android:name="com.searchlike"/>
</intent-filter>
</receiver>
<service android:exported="true" android:name="com.google.firebase.iid.FirebaseInstanceIdService">
<intent-filter android:priority="-500">
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>
<activity android:exported="false" android:name="com.google.android.gms.common.api.GoogleApiActivity" android:theme="#android:style/Theme.Translucent.NoTitleBar"/>
<activity android:name="com.facebook.CustomTabMainActivity"/>
<provider android:authorities="com.searchlike.crashlyticsinitprovider" android:exported="false" android:initOrder="100" android:name="com.crashlytics.android.CrashlyticsInitProvider"/>
<provider android:authorities="com.searchlike.firebaseinitprovider" android:exported="false" android:initOrder="100" android:name="com.google.firebase.provider.FirebaseInitProvider"/>
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version"/>
<activity android:configChanges="orientation|screenSize" android:excludeFromRecents="true" android:exported="false" android:name="com.twitter.sdk.android.core.identity.OAuthActivity"/>
<provider android:authorities="com.searchlike.MarketingInitProvider" android:exported="false" android:name="com.facebook.marketing.internal.MarketingInitProvider"/>
<provider android:authorities="com.searchlike.FacebookInitProvider" android:exported="false" android:name="com.facebook.internal.FacebookInitProvider"/>
<receiver android:exported="false" android:name="com.facebook.CurrentAccessTokenExpirationBroadcastReceiver">
<intent-filter>
<action android:name="com.facebook.sdk.ACTION_CURRENT_ACCESS_TOKEN_CHANGED"/>
</intent-filter>
</receiver>
</application>
Seems that most of your activities are Google/Facebook/Twitter SDKs
So the only activity left is com.reactnativenavigation.controllers.NavigationActivity
Your manifest should look like this:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.searchlike" platformBuildVersionCode="26" platformBuildVersionName="8.0.0">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" />
<permission android:name="com.searchlike.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.searchlike.permission.C2D_MESSAGE" />
<uses-permission android:name="com.sec.android.provider.badge.permission.READ" />
<uses-permission android:name="com.sec.android.provider.badge.permission.WRITE" />
<uses-permission android:name="com.htc.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.htc.launcher.permission.UPDATE_SHORTCUT" />
<uses-permission android:name="com.sonyericsson.home.permission.BROADCAST_BADGE" />
<uses-permission android:name="com.sonymobile.home.permission.PROVIDER_INSERT_BADGE" />
<uses-permission android:name="com.anddoes.launcher.permission.UPDATE_COUNT" />
<uses-permission android:name="com.majeur.launcher.permission.UPDATE_BADGE" />
<uses-permission android:name="com.huawei.android.launcher.permission.CHANGE_BADGE" />
<uses-permission android:name="com.huawei.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.huawei.android.launcher.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.READ_APP_BADGE" />
<uses-permission android:name="com.oppo.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.oppo.launcher.permission.WRITE_SETTINGS" />
<uses-permission android:name="me.everything.badger.permission.BADGE_COUNT_READ" />
<uses-permission android:name="me.everything.badger.permission.BADGE_COUNT_WRITE" />
<meta-data android:name="android.support.VERSION" android:value="25.3.1" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application android:allowBackup="true" android:icon="#mipmap/ic_launcher" android:label="#string/app_name" android:name="com.searchlike.MainApplication" android:resizeableActivity="false" android:supportsRtl="true" android:theme="#style/AppTheme">
<meta-data android:name="io.branch.sdk.BranchKey" android:value="key_live_opyq0ew8g6mMmHYn4ipBeamdutiwNotx" />
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="#drawable/icon_notification" />
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="#color/theme_blue" />
<meta-data android:name="com.google.firebase.messaging.default_notification_channel_id" android:value="#string/default_notification_channel_id" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/fb_app_id" />
<activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize" android:label="#string/app_name" android:name="com.facebook.FacebookActivity" android:theme="#style/com_facebook_activity_theme" />
<activity android:exported="true" android:name="com.facebook.CustomTabActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<activity android:exported="false" android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<meta-data android:name="io.fabric.ApiKey" android:value="be5f8dca0dd9bc907c780c5063740e13dafb4a5b" />
<service android:name="io.invertase.firebase.messaging.RNFirebaseBackgroundMessagingService" />
<service android:name="io.invertase.firebase.messaging.RNFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service android:name="io.invertase.firebase.messaging.RNFirebaseInstanceIdService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<receiver android:exported="true" android:name="io.branch.referral.InstallListener" />
<receiver android:exported="true" android:name="com.kochava.base.ReferralReceiver" />
<receiver android:enabled="true" android:exported="true" android:name="com.androidbroadcastreceiverforreferrer.ReferrerBroadcastReceiver" />
<receiver android:exported="true" android:name="com.searchlike.ReferrerForwarder">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<provider android:authorities="com.searchlike.provider" android:exported="false" android:grantUriPermissions="true" android:name="com.imagepicker.FileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="#xml/provider_paths" />
</provider>
<activity android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:name="com.reactnativenavigation.controllers.NavigationActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:exported="true" android:name="com.google.firebase.messaging.FirebaseMessagingService">
<intent-filter android:priority="-500">
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service android:name="com.google.firebase.components.ComponentDiscoveryService">
<meta-data android:name="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar" android:value="com.google.firebase.components.ComponentRegistrar" />
<meta-data android:name="com.google.firebase.components:com.google.firebase.iid.Registrar" android:value="com.google.firebase.components.ComponentRegistrar" />
</service>
<receiver android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementReceiver" />
<receiver android:enabled="true" android:exported="true" android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver" android:permission="android.permission.INSTALL_PACKAGES">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<service android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementService" />
<service android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementJobService" android:permission="android.permission.BIND_JOB_SERVICE" />
<receiver android:exported="true" android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.searchlike" />
</intent-filter>
</receiver>
<service android:exported="true" android:name="com.google.firebase.iid.FirebaseInstanceIdService">
<intent-filter android:priority="-500">
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<activity android:exported="false" android:name="com.google.android.gms.common.api.GoogleApiActivity" android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<activity android:name="com.facebook.CustomTabMainActivity" />
<provider android:authorities="com.searchlike.crashlyticsinitprovider" android:exported="false" android:initOrder="100" android:name="com.crashlytics.android.CrashlyticsInitProvider" />
<provider android:authorities="com.searchlike.firebaseinitprovider" android:exported="false" android:initOrder="100" android:name="com.google.firebase.provider.FirebaseInitProvider" />
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
<activity android:configChanges="orientation|screenSize" android:excludeFromRecents="true" android:exported="false" android:name="com.twitter.sdk.android.core.identity.OAuthActivity" />
<provider android:authorities="com.searchlike.MarketingInitProvider" android:exported="false" android:name="com.facebook.marketing.internal.MarketingInitProvider" />
<provider android:authorities="com.searchlike.FacebookInitProvider" android:exported="false" android:name="com.facebook.internal.FacebookInitProvider" />
<receiver android:exported="false" android:name="com.facebook.CurrentAccessTokenExpirationBroadcastReceiver">
<intent-filter>
<action android:name="com.facebook.sdk.ACTION_CURRENT_ACCESS_TOKEN_CHANGED" />
</intent-filter>
</receiver>
</application>
You have to put below snippet of code in manifest file only inside the activity tag of that specific activity which you want to launch first when app starts.
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
For Example: You want to launch com.reactnativenavigation.controllers.NavigationActivity activity first when app starts then your manifest file for this activity will look alike:
<activity android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:name="com.reactnativenavigation.controllers.NavigationActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
I have recently decided to upgrade my Android project to gradle 4.4 (because jack was way too slow), but I now have another issue.
Please, do NOT reply with "android.enableAapt2=false" as this is not a solution, it basically just ignores all these errors.
50% of my AndroidManifest.xml reports errors. (you can see the contents below)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="app.puresecure"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="19"
android:targetSdkVersion="26" />
<provider
android:name="app.puresecure.MailSender"
android:authorities="com.purescure.MailSender"
android:enabled="true"
android:exported="true"
android:grantUriPermissions="true" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<uses-feature
android:name="android.hardware.camera2"
android:required="true" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-feature android:name="android.hardware.camera" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<uses-permission android:name="android.Manifest.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.Manifest.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.DEVICE_POWER" />
<!-- Optional permission for Analytics to run. -->
<uses-permission android:name="android.permission.WAKE_LOCK" /> <!-- Required by older versions of Google Play services to create GCM registration tokens -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<permission
android:name="app.puresecure.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="app.puresecure.permission.C2D_MESSAGE" />
<application
android:allowBackup="true"
android:debuggable="true"
android:icon="#drawable/logo_transparent"
android:label="PureSecure"
android:roundIcon="#drawable/logo_transparent"
android:supportsRtl="true"
android:testOnly="true"
android:theme="#style/AppTheme" >
<activity
android:name="app.puresecure.DevicesActivity"
android:label="My devices"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name="app.puresecure.SignupActivity"
android:label="Sign up" />
<activity
android:name="app.puresecure.LoginActivity"
android:label="PureSecure" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />
<activity
android:name="app.puresecure.MapsActivity"
android:label="#string/title_activity_maps" />
<activity
android:name="app.puresecure.MainScreen"
android:label="Device Info"
android:theme="#style/AppTheme.NoActionBar" />
<service android:name="app.puresecure.BackgroundService" />
<receiver
android:name="app.puresecure.DeviceAdmin"
android:permission="android.permission.BIND_DEVICE_ADMIN" >
<meta-data
android:name="android.app.device_admin"
android:resource="#xml/device_admin_policies" />
<intent-filter>
<action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
</intent-filter>
</receiver>
<activity android:name="app.puresecure.PINActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="app.puresecure.SetPINActivity" />
<activity
android:name="app.puresecure.GoingOutActivity"
android:theme="#style/AppTheme.NoActionBar" />
<activity android:name="app.puresecure.ControlActivity" />
<activity
android:name="app.puresecure.FriendsActivity"
android:label="Friends"
android:theme="#style/AppTheme.NoActionBar" />
<!--
<service
android:name=".PictureCapturingServiceImpl"
android:enabled="true"
android:exported="true" />
-->
<activity
android:name="app.puresecure.Splash"
android:label="Settings" />
<activity android:name="app.puresecure.SettingsActivity" />
<activity android:name="app.puresecure.LocationActivity" />
<meta-data
android:name="android.support.VERSION"
android:value="26.1.0" />
<receiver android:name="com.google.android.gms.cast.framework.media.MediaIntentReceiver" />
<service android:name="com.google.android.gms.cast.framework.media.MediaNotificationService" />
<service android:name="com.google.android.gms.cast.framework.ReconnectionService" /> <!-- Include the AdActivity and InAppPurchaseActivity configChanges and themes. -->
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:exported="false"
android:theme="#android:style/Theme.Translucent" />
<receiver
android:name="com.google.android.gms.analytics.AnalyticsReceiver"
android:enabled="true"
android:exported="false" >
</receiver>
<service
android:name="com.google.android.gms.analytics.AnalyticsService"
android:enabled="true"
android:exported="false" />
<service
android:name="com.google.android.gms.analytics.AnalyticsJobService"
android:enabled="true"
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE" />
<activity
android:name="com.google.android.gms.appinvite.PreviewActivity"
android:exported="true"
android:theme="#style/Theme.AppInvite.Preview" >
<intent-filter>
<action android:name="com.google.android.gms.appinvite.ACTION_PREVIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity"
android:excludeFromRecents="true"
android:exported="false"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<!--
Service handling Google Sign-In user revocation. For apps that do not integrate with
Google Sign-In, this service will never be started.
-->
<service
android:name="com.google.android.gms.auth.api.signin.RevocationBoundService"
android:exported="true"
android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION" />
<activity
android:name="com.google.firebase.auth.internal.FederatedSignInActivity"
android:excludeFromRecents="true"
android:exported="true"
android:launchMode="singleInstance"
android:permission="com.google.firebase.auth.api.gms.permission.LAUNCH_FEDERATED_SIGN_IN"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<activity
android:name="com.google.android.gms.common.api.GoogleApiActivity"
android:exported="false"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<!--
FirebaseMessagingService performs security checks at runtime,
no need for explicit permissions despite exported="true"
-->
<service
android:name="com.google.firebase.messaging.FirebaseMessagingService"
android:exported="true" >
<intent-filter android:priority="-500" >
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name="com.google.android.gms.tagmanager.TagManagerService"
android:enabled="true"
android:exported="false" />
<activity
android:name="com.google.android.gms.tagmanager.TagManagerPreviewActivity"
android:exported="true"
android:noHistory="true" > <!-- optional, removes the previewActivity from the activity stack. -->
<intent-filter>
<data android:scheme="tagmanager.c.app.puresecure" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
<receiver
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="true"
android:exported="false" >
</receiver>
<receiver
android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver"
android:enabled="true"
android:exported="true"
android:permission="android.permission.INSTALL_PACKAGES" >
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<service
android:name="com.google.android.gms.measurement.AppMeasurementService"
android:enabled="true"
android:exported="false" />
<service
android:name="com.google.android.gms.measurement.AppMeasurementJobService"
android:enabled="true"
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE" />
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="app.puresecure" />
</intent-filter>
</receiver>
<!--
FirebaseInstanceIdService performs security checks at runtime,
no need for explicit permissions despite exported="true"
-->
<service
android:name="com.google.firebase.iid.FirebaseInstanceIdService"
android:exported="true" >
<intent-filter android:priority="-500" >
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<provider
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:authorities="app.puresecure.firebaseinitprovider"
android:exported="false"
android:initOrder="100" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="android.arch.lifecycle.VERSION"
android:value="27.0.0-SNAPSHOT" />
<provider
android:name="com.android.tools.ir.server.InstantRunContentProvider"
android:authorities="app.puresecure.com.android.tools.ir.server.InstantRunContentProvider"
android:multiprocess="true" />
</application>
</manifest>
Some of the errors I get:
error: unknown element <provider> found.
error: unknown element <intent-filter> found.
Attribute android:theme is not allowed here.
This block should be in tag
<provider
android:name="app.puresecure.MailSender"
android:authorities="com.purescure.MailSender"
android:enabled="true"
android:exported="true"
android:grantUriPermissions="true" />
I know this questions has been asked a lot but I really don't get any answer
My app is not compatible with any phone:
Developer console
this is my android manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="amaigh.biolotel">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="#drawable/ico"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".FullscreenActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="#string/app_name"
android:theme="#style/FullscreenTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar">
</activity>
<activity android:name=".Settings" />
<activity android:name=".Chooser" />
<activity android:name=".PdfReader"></activity>
</application>
</manifest>
When I Analyze my app with android studio I get this manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="3"
android:versionName="1.0"
package="amaigh.biolotel"
platformBuildVersionCode="25"
platformBuildVersionName="7.1.1">
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="25" />
<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission
android:name="android.permission.INTERNET" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission
android:name="android.permission.WAKE_LOCK" />
<uses-permission
android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission
android:name="amaigh.biolotel.permission.C2D_MESSAGE"
android:protectionLevel="0x2" />
<uses-permission
android:name="amaigh.biolotel.permission.C2D_MESSAGE" />
<application
android:theme="#ref/0x7f08003b"
android:label="#ref/0x7f06003d"
android:icon="#ref/0x7f02006d"
android:debuggable="true"
android:allowBackup="true"
android:supportsRtl="true">
<activity
android:theme="#ref/0x7f0800d7"
android:label="#ref/0x7f06003d"
android:name="amaigh.biolotel.FullscreenActivity"
android:configChanges="0x4a0">
<intent-filter>
<action
android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:theme="#ref/0x7f08003c"
android:label="#ref/0x7f06003d"
android:name="amaigh.biolotel.MainActivity" />
<activity
android:name="amaigh.biolotel.Settings" />
<activity
android:name="amaigh.biolotel.Chooser" />
<activity
android:name="amaigh.biolotel.PdfReader" />
<activity
android:theme="#ref/0x0103000f"
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="0xfb0" />
<activity
android:theme="#ref/0x7f080125"
android:name="com.google.android.gms.ads.purchase.InAppPurchaseActivity" />
<activity
android:theme="#ref/0x01030010"
android:name="com.google.android.gms.common.api.GoogleApiActivity"
android:exported="false" />
<receiver
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="true"
android:exported="false" />
<receiver
android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver"
android:permission="android.permission.INSTALL_PACKAGES"
android:enabled="true">
<intent-filter>
<action
android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<service
android:name="com.google.android.gms.measurement.AppMeasurementService"
android:enabled="true"
android:exported="false" />
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
android:permission="com.google.android.c2dm.permission.SEND"
android:exported="true">
<intent-filter>
<action
android:name="com.google.android.c2dm.intent.RECEIVE" />
<action
android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category
android:name="amaigh.biolotel" />
</intent-filter>
</receiver>
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver"
android:exported="false" />
<service
android:name="com.google.firebase.iid.FirebaseInstanceIdService"
android:exported="true">
<intent-filter
android:priority="-500">
<action
android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<provider
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:exported="false"
android:authorities="amaigh.biolotel.firebaseinitprovider"
android:initOrder="100" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#ref/0x7f0a0006" />
</application>
</manifest>
Don't use this code in manifest.. if you are using android studio
just check in your app.gridle file min and target SDK api no
When the gcm push notification is sent, response shows successful, but at that time app was in stopped mode so msg must be queued, but when I restart the app gcm notification does'nt get received
Manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<permission
android:name="com.example.gcm.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.gcm.permission.C2D_MESSAGE" />
<uses-feature
android:name="android.hardware.telephony"
android:required="false" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<!--
The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
Google Maps Android API v2, but are recommended.
-->
<application
android:allowBackup="true"
android:icon="#mipmap/ic_resqlife_logo"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name=".SplashScreen"
android:label="#string/app_name"
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=".UserChoice"
android:label="#string/title_activity_user_choice"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".RegFormActivity"
android:label="#string/title_activity_reg_form"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".OTPVerificationActivity"
android:label="#string/title_activity_otpverification"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:launchMode="singleTask"
android:screenOrientation="portrait" >
</activity>
<service
android:name=".GcmIntentService"
android:exported="true" >
</service>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/google_maps_key" />
<activity
android:name=".MapsActivity"
android:label="#string/title_activity_maps"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".GooglePlayServicesActivity"
android:label="#string/title_activity_google_play_services"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".ContactsListActivity"
android:label=""
android:screenOrientation="portrait" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
<receiver
android:name=".GcmBroadcastReceiver"
android:enabled="true"
android:exported="true" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.example.gcm" />
</intent-filter>
</receiver>
<activity
android:name=".AlertActivity"
android:configChanges="orientation|keyboardHidden|keyboard"
android:label="#string/title_activity_alert"
android:screenOrientation="portrait" >
</activity>
<service
android:name=".LocationService"
android:exported="true" >
</service>
<activity
android:name=".NetworkActivity"
android:label="#string/title_activity_network"
android:screenOrientation="portrait" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
<activity
android:name=".UpdateNetworkActivity"
android:label="#string/title_activity_update_network" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".NetworkActivity" />
</activity>
<receiver
android:name=".ReregisterGCMReceiver"
android:enabled="true"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REPLACED" />
<data
android:path="com.tpl.arpitgoyal.resqlife"
android:scheme="package" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<activity
android:name=".UpdateProfile"
android:label="#string/title_activity_update_profile" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
<activity
android:name=".NoInternetActivity"
android:label="#string/title_activity_no_internet"
android:launchMode="singleTask" >
</activity>
<activity
android:name=".InviteActivity"
android:label="#string/title_activity_invite" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
<activity
android:name=".CoordinatesActivity"
android:label="#string/title_activity_coordinates" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="maps.google.com" />
<data android:scheme="https" />
<data android:pathPattern="/.*" />
</intent-filter>
</activity>
<!--
<receiver
android:name=".UnInstallReceiver"
android:enabled="true"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<data
android:path="com.tpl.arpitgoyal.resqlife"
android:scheme="package" />
</intent-filter>
</receiver>
-->
<activity
android:name=".SliderButtonActivity"
android:label="#string/title_activity_slider_button" >
</activity>
<service
android:name=".VibratorService"
android:exported="true" >
</service>
<activity
android:name=".SmsOTPVerificationActivity"
android:label="#string/title_activity_sms_otpverification" >
</activity>
<service
android:name=".OnLineService"
android:enabled="true"
android:exported="false" >
</service>
</application>
I am working on an app where I use Parse to send and receive notifications. The problem now is that when I register an installation deviceToken is empty (deviceType and installationId aren't empty). When this token is empty I can't receive any notifications.
How I register the installation:
Parse.initialize(this, "x", "x");
ParseInstallation.getCurrentInstallation().saveInBackground();
When I added all the code for Parse to my app (https://www.parse.com/apps/quickstart#parse_push/android/native/existing) everything was working fine.
My AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xxx.xxx" >
<uses-sdk android:maxSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:protectionLevel="signature"
android:name="com.xxx.xxx.permission.C2D_MESSAGE" />
<uses-permission android:name="com.xxx.xxx.permission.C2D_MESSAGE" />
<application
android:name="com.xxx.xxx.Name_"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:logo="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.gms.analytics.globalConfigResource"
android:resource="#xml/global_tracker" />
<activity
android:name="com.xxx.xxx.Activities.SplashActivity_"
android:screenOrientation="portrait"
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="com.xxx.xxx.Activities.LoginActivity_"
android:screenOrientation="portrait"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.xxx.xxx.Activities.ForgotPassword_"
android:screenOrientation="portrait"
android:label="#string/app_name">
</activity>
<activity
android:name="com.xxx.xxx.Activities.MainActivity_"
android:screenOrientation="portrait"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.xxx.xxx.Activities.EditProfile_"
android:screenOrientation="portrait"
android:label="#string/edit_profile" >
</activity>
<receiver android:name="com.google.android.gms.analytics.AnalyticsReceiver"
android:enabled="true">
<intent-filter>
<action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH" />
</intent-filter>
</receiver>
<service android:name="com.google.android.gms.analytics.AnalyticsService"
android:enabled="true"
android:exported="false"/>
<service android:name="com.parse.PushService" />
<receiver android:name="com.parse.ParseBroadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.USER_PRESENT" />
</intent-filter>
</receiver>
<receiver android:name=".Receiver.MyPushBroadcastReceiver"
android:exported="false">
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.DELETE" />
<action android:name="com.parse.push.intent.OPEN" />
</intent-filter>
</receiver>
<receiver android:name="com.parse.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.xxx.xxx" />
</intent-filter>
</receiver>
</application>
</manifest>
I just created a new application, added Parse and deleted the Installation class/table in Parse but still no deviceToken.
I think it's a bug in the new Parse SDK. I downgraded to 1.9.0 and everything works fine now.
Source: https://groups.google.com/forum/#!topic/parse-developers/a1Z0SSC304M