I'm using OneSignal for my Android notifications. I am able to receive the notification and start an activity in my own NotificationOpenedHandler():
String code = payload.additionalData.getString(Cons.KEY_CODE);
if(code.equalsIgnoreCase(Cons.NOTIFICATION_DETAIL_SCREEN)) {
Intent intent = new Intent(getApplicationContext(), DetailActivity.class);
startActivity(intent);
}
The problem is that if I'm in another app and I click the notification, my app will not be brought to the front. Although when I navigate to my app, the activity I specified above has launched as intended.
I've disabled the default launcher in my manifest as well:
<meta-data android:name="com.onesignal.NotificationOpened.DEFAULT" android:value="DISABLE" />
Anyone know why my app is not being brought to front?