mobile-messaging-sdk-android
mobile-messaging-sdk-android copied to clipboard
Notification behavior after removing app task
Steps: 1.Receive infobip notification 2.press home button 3.swipe app from tasks 4.notification remains visible (behaves like ongoing notification) 5.clicking on notification. 6.broadcast receiver has explicit intent for custom activity. after click nothing happens for few seconds, then launch activity appears (not the one explicitely intented), without any data. There must be some behavior either to make notification cancel after task removed, and then show it again after app launch, or behavior for running explicitely intented activity. Help please.
Hi @Arkadzi, Sorry for the late response. We're checking the issue and will get back to you soon with the answer.
Hello @tjuric,
Facing the similar issue and able to get the callback on BroadcastReceiver on tapping on the Notification after killing the app from the background.
Steps:
- Receive infobip notification
- press home button
- swipe app from tasks
- notification remains visible (behaves like ongoing notification)
- clicking on notification.
- On receive method of broadcast receiver is not called and the notification gets dismiss. So user gets stucks and not able to navigate to the application.
Help please on this scenario.
In AndroidManifest
<receiver
android:name=".receiver.NotificationReceiver"
android:exported="false">
<intent-filter>
<action android:name="org.infobip.mobile.messaging.NOTIFICATION_TAPPED" />
</intent-filter>
</receiver>
For some device like Realme Version 8.1
, OnePlus 6
, OnePlus 7T Pro Version 11
this broadcast receiver not getting trigger when application is killed from the background after receiving the notification and tapping on the notification which is visible in the notification tray.
Hi @pratikkukadia, we will check it soon, thank you for reporting.
BR, Olga
Hi @pratikkukadia , we checked the scenario on available devices and on different Android API versions, and can't reproduce it.
We used our deeplinking example for testing, just put logging at the beginning of the onReceive
method and it's always presented in logcat.
May be you could test it like this, or may be provide some specific Android API version, where we could reproduce it?
In addition, for default notifications we use default priority channel option and don't use setOngoing, so notifications shouldn't behave like persistent notifications.
BR, Olga
Hi @riskpp, below is the NotificationSettings
NotificationSettings.Builder(this)
.withMultipleNotifications()
.withDefaultIcon(R.drawable.ic_stat_notification)
.withColor(ContextCompat.getColor(this, R.color.colorAccent))
.build()
Infobip Sdk version : 4.3.1@aar.
The issue is of specific Realme Version 8.1
, OnePlus 6
, OnePlus 7T Pro Version 11
devices. I am having the Samsung device
and it's working fine in that device.
So can you please check in the specific devices mention and also let me know in which devices have to tested the above scenario.
Thanks, Pratik
Hi @pratikkukadia , while we are trying to find some of the devices you mentioned, could you please check do you also have such issue in our demo app from google play?
For now looks like the issue can be connected with
- Battery Optimization
- Apps hibernation
- or other setting on the devices.
BR, Olga
Hi @pratikkukadia, we checked the scenario on OnePlus 7 Pro
and the issue isn't reproduced on our demo app.
BR, Olga
Hi @riskpp, we have tested in OnePlus 7T Pro
by installing your the demo app from google play?
The issue is reproduced. We have recorded the video for your reference.
Please let us know if you need anything else.
PFA
https://user-images.githubusercontent.com/12750620/115560279-0ecbc800-a2d2-11eb-86a1-2265d4cd53f1.mp4
Hi @pratikkukadia Could you please clarify, which Android version do you have on that device?
BR, Olga
Hi @riskpp
The Android version on OnePlus 7T Pro
is version 11
.
Hi @pratikkukadia, we again tried to reproduce it on OnePlus 7 Pro
after updating it to Android 11
with different battery optimization settings and closest thing we got is that, after we tapped on notification, app is opened after delay for 30sec-1min.
In logs also nothing interesting was found, just previous process died and new one created with delay.
Could you check, if after tapping on notification you will wait during 1 min, will application be opened or not?
The exact case you mentioning we can't reproduce unfortunately.
BR, Olga
Hi @riskpp, I have tried the steps you have mention and waited for about 1 and half mins but still the app does not get open. For your reference I have record a video for the same and attached it.
Please lets us know if u need anything else.
https://drive.google.com/file/d/1cIAI6EkTLrDxc66wslW8HPZRK-dXzjv9/view?usp=sharing
Hi @pratikkukadia, Could you please send us screenshots of your settings in
-
System > Developer options
-
Settings > Battery > Battery optimization > <Select Application> Infobip Push
Hopefully it'll help us investigate this.
BR, Olga
Hi @riskpp ,
Please find the attached screenshots of OnePlus 7T Pro
Hi @riskpp We are waiting for an update from you. Can you please provide it ?
Thanks
Hi @hpatel123,
Unfortunately screenshots, you provided, didn’t help us to investigate the issue, for similar settings in our device infobip’s showcase application opens after tapping on notification (sometimes after delay). You could send us heap dump of the app after notification tapped, may be it could help.
BR, Olga
Hi @riskpp we have provided video of issue along with device settings screenshots. Now your team has to debug it with the same device.
Note that in your sample application it is not working so you must look into this.
Thank you for the video, we definitely saw it, and debugged our showcase on exactly the same device with the same Android OS version (OnePlus 7 Pro with Android 11), but the closest thing we got is that after we tapped on notification app is opened after delay for 30sec-1min. Only thing we could propose you now is to get heap dump from your device when you tap on notification. Other idea of ours is to try to find one more device with the same settings and try to reproduce it. We will also try to reproduce it on another OnePlus 7 Pro with Android 11 device.
Just in case, if you didn’t try to restart the device, try it please.
BR, Olga
Hi @riskpp Can you please post the video which shows that the notification tapping works fine even application is in kill mode ? Also please post the screenshots of device which shows Android version.
It would help us.
Hi @hpatel123, video and screenshot:
https://user-images.githubusercontent.com/8104718/124075505-a0338500-da4d-11eb-822f-18c01fb4827a.mp4
Is this issue still relevant, @hpatel123?
@tjuric Looks like similar issue. We can still reproduce this issue.
@tjuric Is there any update on this?, still we are facing this issue when tapping on notification nothings happens. Device : Redmi9i with Android Version-10 Version : 6.2.0
Hi @pankaj89 unfortunately we are unable to reproduce the issue, you could try disable battery optimisation for the application, but for us on the OnePlus 7 it works even with it.