Skip to content

Commit 064f312

Browse files
committed
Changed URL intent type and category
1 parent 76322a3 commit 064f312

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1414,7 +1414,9 @@ private static boolean openURLFromNotification(Context context, JSONArray dataAr
14141414
if (!url.contains("://"))
14151415
url = "http://" + url;
14161416

1417-
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url.trim()));
1417+
Intent intent = new Intent(Intent.ACTION_MAIN, Uri.parse(url.trim()));
1418+
intent.addCategory(Intent.CATEGORY_LAUNCHER);
1419+
14181420
intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET |Intent.FLAG_ACTIVITY_MULTIPLE_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
14191421
context.startActivity(intent);
14201422
urlOpened = true;

0 commit comments

Comments
 (0)