phonegap / phonegap-plugin-push

Register and receive push notifications
MIT License
1.94k stars 1.91k forks source link

Blank screen is displayed in few devices instead of picture #2925

Open KishoreKoushik opened 4 years ago

KishoreKoushik commented 4 years ago

Expected Behaviour

A push notification should be received to the user with a picture displayed with the notification.

image

Actual Behaviour

Though its working as expected for most of the users, for few users, they dont see the picture attached. They only see a blank space instead of that

image

Reproduce Scenario (including but not limited to)

Fire the push notification request from the postman

Steps to Reproduce

Fire the push notification request from the postman

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

Android Version 9

(Android) What device vendor (e.g. Samsung, HTC, Sony...)

Issue is noticed in Xiomi note 8 and Samsung J7 Nxt

Cordova CLI version and cordova platform version

cordova --version                                    9.0.0
cordova platform version android          8.0.0

Plugin version

cordova plugin version | grep phonegap-plugin-push   ^2.3.0   

Sample Push Data Payload

{ "to" : "c9woN7UboEg:APA91bG64PO7uoChESmOKan6ASJcbQrKUdk8IEqEayt_n76csFsgYhycP0_H_NndulIOMbTum0UiMsikBbFl6IoWTjRMnXrd6F8bzN0qPsliLVHvhCVvNXV7IHveqgWD4pGfldzqMj7P", "collapse_key" : "type_a", "data" : { "body" : "body text", "title": "title text", "image": "www/assets/Logo/SPAR-LOGO.png", "priority": 2, "style":"picture", "picture": "https://i.ibb.co/0ycWjzG/Crazy-Friday-offer.jpg", "force-start": 1, "content-available":1 } }

Sample Code that illustrates the problem

` const options: PushOptions = { android: { //shows the notification even when the app is in foreground but nothing happens on click forceShow: true, }, ios: { alert: 'true', //uncomment this while debugging //fcmSandbox: true, topics: ['push-test-topic-ios'], badge: true, sound: 'false' }, windows: {}, browser: { pushServiceURL: 'http://push.api.phonegap.com/v1/push' } };

const pushObject: PushObject = this.push.init(options);

`