I encountered a problem where the app is closed completely, and I start the first notification it opens where it needs to open, but when I tap the second notification, nothing happens. Notification close and it doesn't land anywhere where it should.
Here's the code in NotificationLaunchIntentProvider where I handle PendingIntent routing.
private final SalesForceNotificationRouter notificationRouter; public SalesForceNotificationCustomizationManager(AppConfig appConfig) { this.notificationRouter = new SalesForceNotificationRouter(appConfig); } @Nullable @Override public PendingIntent getNotificationPendingIntent(@NonNull Context context, @NonNull NotificationMessage notificationMessage) { PendingIntent notificationRoute = notificationRouter.getNotificationRoute(context, notificationMessage.url()); return NotificationManager.redirectIntentForAnalytics(context, notificationRoute, notificationMessage, true); } Here's the code in SalesForceNotificationRouter
private final AppConfig appConfig; public SalesForceNotificationRouter(AppConfig config) { this.appConfig = config; } public PendingIntent getNotificationRoute(Context context, String url) { if (url == null || TextUtils.isEmpty(url)) { Intent intent = new Intent(context, HomeActivity.class); return pendingIntent(context, intent); } String path = url.trim(); Uri uri = Uri.parse(path); String scheme = uri.getScheme(); if (scheme != null && scheme.equalsIgnoreCase(appConfig.getScheme())) { Intent intent = DeeplinkActivity.initializeResponseIntent(context, uri); return pendingIntent(context, intent); } else { Intent intent = new Intent(context.getApplicationContext(), ResolverActivity.class); intent.putExtra(IntentCommand.EXTRA_URL, path); intent.putExtra(BaseActivity.EXTRA_CAME_FROM_NOTIFICATION, true); return pendingIntent(context, intent); } } private PendingIntent pendingIntent(Context context, Intent intent) { return PendingIntent.getActivity( context, randomRequestCode(), intent, PendingIntent.FLAG_UPDATE_CURRENT ); } private int randomRequestCode() { return (int) (System.currentTimeMillis() & 0xfffffff); } I think before 1 year or less since now, everything was working fine. I wonder where's the problem because i tried to change things like PedingIntent flags, request code, tried opening different activities but nothing helped.
SDK version : 8.0.4 doesnt work in 7.4.2 also (didn't tried lower versions)