Description:
Per the OneSignal "Changing the open action of a notification" documentation auto launching your app can be prevented by adding the following to your AndroidManifest.xml:
<meta-data android:name="com.onesignal.NotificationOpened.DEFAULT" android:value="DISABLE" />
This works to prevent the app from launching the main Activity if the app is cold starting. However if the is still in the background it is resumed. This is inconsistent and it should not resume in this case.
Environment
- OneSignal-Android-SDK 4.4.0
- Issue is most likely present back to 4.0.0, internally OneSignal switched to using an Activity from a BroadcastReceiver previously.
- Confirmed the issue on Android 10 and 11
Steps to Reproduce Issue:
- Add the OneSignal SDK to your project
- Follow the "Changing the open action of a notification" guide.
- Send a push.
- Background the app
- Tap on the notification
- App is resumed.
- However it should NOT due to disabling this auto behavior on step 2.
Description:
Per the OneSignal "Changing the open action of a notification" documentation auto launching your app can be prevented by adding the following to your
AndroidManifest.xml:This works to prevent the app from launching the main Activity if the app is cold starting. However if the is still in the background it is resumed. This is inconsistent and it should not resume in this case.
Environment
Steps to Reproduce Issue: