简体   繁体   中英

My android notification icon is a white square

I am using Raix:Push (Meteor.js push-notification plugin) to send notifications to my android app (Built using meteor's inbuilt cordova). The only problem is that I am getting a white square as notification Icon when the notification arrives. I read we have to use a white notification with a transparent background added to the following path while building the app.

cordova-build-override/platforms/android/res/drawable/pushicon.png

I have done this but nothing seems to have changed. I still get a white square. I have also added the name of the icon to the client startup file under Push.Configure

Anyone experienced this before, any ideas?

Did you set the icon in your push client?

 Push.Configure({
android: {
  senderID: Meteor.settings.public.fcm.senderId,
  iconColor: '#0C431B',
  icon: 'pushicon',
  badge: true,
  sound: true,
  alert: true,
  vibrate: true,
},

I figured this out. I needed to put this folder structure:

cordova-build-override/platforms/android/res/drawable/pushicon.png

at the root of my project, as opposed to inside the /.meteor folder

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM