Closed solojuve1897 closed 4 years ago
@jcesarmobile my read of the Android docs suggest that we would need to implement NotificationManager.getActiveNotifications()
: https://developer.android.com/reference/android/app/NotificationManager.html#getActiveNotifications()
This API is only available on API 23 (our min is 21), but we should just support it conditionally for 23 and above.
The getActiveNotifications() method does not in any way lead to getting data passed by notifications. You can access PendingIntent, but they have blocked accessing the data in the Intent for security reasons.
https://stackoverflow.com/questions/23725035/how-to-get-intent-from-pendingintent/23725068#23725068
It was implemented using getActiveNotifications in https://github.com/ionic-team/capacitor/pull/2266
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.
Description of the problem: When calling method getDeliveredNotifications the following is shown in the logcat:
Sending plugin error: {"save":false,"callbackId":"119341262","pluginId":"PushNotifications","methodName":"getDeliveredNotifications","success":false,"error":{"message":"not implemented"}}
Affected platform
OS of the development machine
Other information:
Capacitor version: Beta. 19 node version:
npm version:
CocoaPods version:
Steps to reproduce:
Link to sample project: