Expected Behaviour
Should preserve all the "unsupported" keys in the "additionalData" object
Actual Behaviour
Does not preserve all the key-value pairs in Androidref and iOSref notification objects
For example: image, sticky, visibility, notification_count
Reproduce Scenario (including but not limited to)
Send a notification through FCM to an app that is using this plugin and log the argument of .on('notification')'s callback
Steps to Reproduce
- Initialize the android and iOS notifications
- Listen for "notification" event
- Log the argument of the event listener's callback
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
Android 9
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
Samsung
Cordova CLI version and cordova platform version
cordova --version # 9.0.0
cordova platform version android # 7.14.0
Plugin version
cordova plugin version | grep phonegap-plugin-push # 2.2.3
Sample Push Data Payload
{
title: title,
body: body,
icon: icon,
color: pinkColor,
// "sound": string,
tag: randomtag,
// "click_action": string,
// "body_loc_key": string,
// "body_loc_args": [
// string
// ],
// "title_loc_key": string,
// "title_loc_args": [
// string
// ],
// "channel_id": string,
// "ticker": string,
sticky: sticky,
// "event_time": string,
// "local_only": boolean,
// "notification_priority": ,
// "default_sound": boolean,
default_vibrate_timings: default_vibrate_timings,
// "default_light_settings": boolean,
// "vibrate_timings": [
// string
// ],
visibility: visibility,
notification_count: count,
// "light_settings": {
// object(LightSettings)
// },
image: image
}
Sample Code that illustrates the problem
// After registration
push.on("notification", (function(data) {
console.log('[_initializeAndroidIOSNotifications] on push "notification":', data.additionalData);
});
Logs taken while reproducing problem
--
Expected Behaviour
Should preserve all the "unsupported" keys in the "additionalData" object
Actual Behaviour
Does not preserve all the key-value pairs in Androidref and iOSref notification objects
For example:
image,sticky,visibility,notification_countReproduce Scenario (including but not limited to)
Send a notification through FCM to an app that is using this plugin and log the argument of
.on('notification')'s callbackSteps to Reproduce
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
Android 9
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
Samsung
Cordova CLI version and cordova platform version
Plugin version
Sample Push Data Payload
Sample Code that illustrates the problem
Logs taken while reproducing problem
--