Android receives the notification but does not open the APP when tap at the notification
Only on Android, the device receives the notification but does not open the application when tapping on the notification. On ios the behavior is as expected
scheduleDate.setSeconds(scheduleDate.getSeconds() + 20);
CapacitorNotifications.schedule([
{
id: 100,
title: "Enterprise Background Runner",
body: "Received silent push notification",
scheduleAt: scheduleDate,
},
]);
resolve();
I'm also having this problem. I'm using version 1.0.6-dev-20240628T145630.0 (as that has fixes for Capacitor 6) I wondered if there had been any progress? It seems like a fairly obvious requirement that tapping the notification should open the app so I wondered if this has ever worked or if there's something obvious I'm missing? Thanks.
Apparently the plugin doesn't make use of actionTypeId in android.
I have been able to make clicking the notification opens the app by modifying native plugin android code.
This might not be the most correct way, I am not an Android dev so not sure :)
val channelId = it.channelId ?: defaultNotificationChannelID
val intent = context.packageManager.getLaunchIntentForPackage(context.packageName)
intent?.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
val pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
val builder = NotificationCompat.Builder(context, channelId)
builder.setContentIntent(pendingIntent)
I'm also facing this issue with Version 2.0.0, is there any update? Also the App-Icon is not Appearing - just an Info Icon.
Still facing the same issue on v2.1.0