-
Notifications
You must be signed in to change notification settings - Fork 668
Description
Bug Report
Handling Push notification in android fails with ClassCastException getting Bundle data
Plugin(s)
PushNotification 7.04
Capacitor Version
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 8.0.1
@capacitor/core: 8.0.1
@capacitor/android: 8.0.1
@capacitor/ios: 8.0.1
Installed Dependencies:
@capacitor/cli: 7.4.3
@capacitor/android: 7.4.3
@capacitor/core: 7.4.3
@capacitor/ios: 7.4.3
[success] iOS looking great! 👌
[success] Android looking great! 👌
Platform(s)
Android
Current Behavior
com.capacitorjs.plugins.pushnotifications.PushNotificationsPlugin.handleOnNewIntent(PushNotificationsPlugin.java
because bundle consists by not only strings. Getting the value with getString results in a ClassCastException
google.delivered_priority normal
google.sent_time 1768683270784
google.ttl 2419200
google.original_priority normal
google.product_id 123456783
from 877301795336
google.message_id 0:1768683270790766%601d94ab601d94ab
gcm.n.analytics_data Bundle[mParcelledData.dataSize=100]
collapse_key de.example.app
Expected Behavior
Skip non string values, or leave numbers as numbers etc...
Code Reproduction
It fails, if an incoming notification is tapped