Skip to content

Commit fc18aa3

Browse files
committed
rm FLAG_ACTIVITY_NO_HISTORY from open URL
Removing FLAG_ACTIVITY_NO_HISTORY so the user can see the Activity to go back to it if they background the app. Also removed other flags so when the user press the back button on the device they are taken to the last Activity in the app if the URL is a deeplink. If the browser is open then it is it's own task and pressing the back button will then take them to the home screen, however the app's task will remind in the list so the user can always get back to where they left off in the app. There isn't any details into why these flags were added, they date back to the 2.0.0 release of this SDK: ce5ad7d#diff-2708f86f77e539cab647ecede9d5fcbead3bf0f954d7f9e536eafbc78ba760d6R792 However given that the user experience is much better in these cases this is a better default. If the URL is a deeplink the app developer could always add other Activity setting to their AndroidManifest.xml for additional control.
1 parent 292e1db commit fc18aa3

File tree

1 file changed

+1
-4
lines changed
  • OneSignalSDK/onesignal/src/main/java/com/onesignal

1 file changed

+1
-4
lines changed

OneSignalSDK/onesignal/src/main/java/com/onesignal/OSUtils.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -579,10 +579,7 @@ static Intent openURLInBrowserIntent(@NonNull Uri uri) {
579579
break;
580580
}
581581
intent.addFlags(
582-
Intent.FLAG_ACTIVITY_NO_HISTORY |
583-
Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET |
584-
Intent.FLAG_ACTIVITY_MULTIPLE_TASK |
585-
Intent.FLAG_ACTIVITY_NEW_TASK
582+
Intent.FLAG_ACTIVITY_NEW_TASK
586583
);
587584
return intent;
588585
}

0 commit comments

Comments
 (0)