Skip to content

Commit 07462cc

Browse files
committed
fixup! WIP - Improve generating intent logic
1 parent fe39291 commit 07462cc

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

OneSignalSDK/onesignal/src/main/java/com/onesignal/GenerateNotificationOpenIntent.kt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,12 @@ class GenerateNotificationOpenIntent(
7474
PendingIntent.FLAG_UPDATE_CURRENT
7575
)
7676

77-
// Launch desired Activity we want the user to be take to the followed by
78-
// OneSignal's invisible notification open tracking Activity
79-
// This allows OneSignal to track the click, fire OSNotificationOpenedHandler, etc while allowing
80-
// the app developer to set the Activity they want at notification creation time. (FUTURE API FEATURE)
81-
// AKA "Reverse Activity Trampolining"
77+
78+
// This setups up a "Reverse Activity Trampoline"
79+
// The first Activity to launch will be oneSignalIntent, which is an invisible
80+
// Activity to track the click, fire OSNotificationOpenedHandler, etc. This Activity
81+
// will finish quickly and the destination Activity, launchIntent, will be shown to the user
82+
// since it is the next in the back stack.
8283
return PendingIntent.getActivities(
8384
context,
8485
requestCode,
@@ -115,4 +116,4 @@ class GenerateNotificationOpenIntent(
115116

116117
return launchIntent
117118
}
118-
}
119+
}

0 commit comments

Comments
 (0)