phonegap/phonegap-plugin-push

android parameters not working?

GAGANsinghmsitece opened this issue · 1 comments

Expected Behaviour

iconcolor and icon specified at plugin initialisation should work as expected.

Actual Behaviour

They are not working.Instead of it notification looks like, and there is no vibration or sound when notification appears
Screenshot_20200412-210711

Reproduce Scenario (including but not limited to)

Steps to Reproduce

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

Android 6.0.1

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

Samsung

Cordova CLI version and cordova platform version

cordova version    9.0.1
cordova platform version android        8.1.0

Plugin version

Plugin version:- 2.3.0

Sample Push Data Payload

 {
    "data":{
          "title": "Test Notification",
          "body": "This offer expires at 11:30 or whatever",
           "notId": 10,
           "surveyID": "ewtawgreg-gragrag-rgarhthgbad",
           "vibrationPattern": [2000, 1000, 500, 500],
           'image':'https://domainname.come/static/imagesicons.png'
           }
  }

Sample Code that illustrates the problem

function onDeviceReady(){
     var push = PushNotification.init({
          android: {
              senderID:'XXXXXXXXXXXX',
              iconColor:'blue',
              icon:'notify',
              alert: true,
              badge: true,
              sound: true,
              vibrate: true
              }
      });
       push.on('registration', function(data) {
         //registering device here
       });
       push.on('notification', function(data) {
         //showing dialog
       });
       push.on('error', function(e) {
          console.log(e.message)
       });
 }

Logs taken while reproducing problem

I'm testing it on real device and sorry but i do not know how to get logs from a device.

To get logs use 'adb logcat | grep push' for push notifs.