Yes
Can't receive push notification in when app is closed (swiped from recents apps)
followed these steps
and from POSTMAN
header
Authorization:key=xxxxxxxxxxxxx
Content-Type:application/json
below is payload
{
"to":"device token",
"priority":"high",
"data":{
"id":"1",
"fetch":"1"
}
}
11-21 11:39:21.575 2650-2650/? W/GCM-DMM: broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE flg=0x10000000 pkg=com.daystays (has extras) }
Should get notification after kill application
AndroidManifest.xml
`
<uses-permission android:name="com.google.android.apps.photos.permission.GOOGLE_PHOTOS"/>
<permission
android:name="com.daystays.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permisssion.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- Permission to receive Google Maps -->
<uses-permission android:name="com.daystays.permission.MAPS_RECEIVE" />
<!-- Maps API needs OpenGL ES 2.0. -->
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<application
android:name="com.daystays.QuinchyApplication"
android:allowBackup="false"
android:icon="@mipmap/app_icon"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:largeHeap="true">
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="key" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<meta-data
android:name="DATABASE"
android:value="db-name" />
<meta-data
android:name="VERSION"
android:value="3" />
<meta-data
android:name="QUERY_LOG"
android:value="true" />
<meta-data
android:name="DOMAIN_PACKAGE_NAME"
android:value="com.daystays" />
<activity
android:name="com.daystays.ui.activity.SplashActivity"
android:label="@string/app_name"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Theme.Splash">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity>...</activity>
<receiver android:name="com.daystays.ui.util.TimeChangeBroadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.TIMEZONE_CHANGED" />
<action android:name="android.intent.action.TIME_SET" />
</intent-filter>
</receiver>
<service
android:name="com.daystays.fcm.RegistrationIntentService"
android:exported="false" />
<service android:name="com.daystays.fcm.AppFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<service android:name="com.daystays.fcm.AppFirebaseInstanceIdService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>
</application>
`
I follow all previous issue of same but i have still this problem.
hi!
have same issue!
any news about this?
Unlike AOSP behaviors, Oxygen OS on OnePlus devices force stop app after swiping it away.
FCM will stop delivering push messages if app is in stopped state.
Since the user intentionally force kills an app, Android assumes the app is not required and its FCM push services are killed as well. This is the normal behaviour of android.
@oasisfeng @shijin-p nope!
this is some kind of mystic cos a lot of other application receiving their push notification as well even after swipe app.
for example https://github.com/DrKLO/Telegram
@pro100svitlo That's because Telegram is using its own push service together with FCM.
ok, than the same with Gmail, facebook, whatsapp etc?
@pro100svitlo Gmail use SyncAdapter together with GCM. Facebook and Whatsapp (assume you mean it) have their own push services.
I think some phones do Force Stop when you close the application with swipe.
WhatsApp has a workaround for Force Stop case.
https://www.quora.com/How-does-WhatsApp-or-Gmail-receive-notification-even-after-force-closing-them
...From the link.
To overcome this problem, you can restart the app if at all it gets killed by any reason. On Android, it involves catching exceptions that cause the force close through the uncaughtExceptionHandler(){...} and then restarting the app.
...
@GiHutb against, same telegram can play audio without any stop even after app swiped from recent
Thanks for the discussion everyone. As noted, there's not much we can do here unless you want to try some of the hacks that these other applications are doing. Closing in favor of previous discussions.
I had a similar problem, solved it disabling deep clear.
Settings->advance->recent app management-> normal clear!
Hello
have same issue!!!!
any one resolved this issue or any alternative for FCM
Even i am facing the same problem!
Please help to solve if anyone have found the solution!
Even i am facing the same problem!
Please help to solve if anyone have found the solution!
I have resolved this issue from its official documents the step by step solution is given.
https://firebase.google.com/docs/cloud-messaging/android/receive
Most helpful comment
Hello
have same issue!!!!
any one resolved this issue or any alternative for FCM