mhartington / ama

Ask me anything!
5 stars 1 forks source link

Push notification badge count not showing on android #17

Closed zameer closed 8 years ago

zameer commented 8 years ago

We are developing a mobile app with Ionic 2 and use push notifications, that works fine but icon badge not showing and indicating the count in ANDROID devices.

01. Cloud Setting

const cloudSettings: CloudSettings = {
  'core': {
    'app_id': 'xxxxxxxx',
  },
  'push': {
    'sender_id': 'xxxxxxxxxx',
    'pluginConfig': {
      'ios': {
        'badge': true,
        'sound': true
      },
      'android': {
        'iconColor': '#fff',
      }
    }
  }
};

02. API POST: https://api.ionic.io/push/notifications

{
    "tokens": [TOKEN]
    "profile": "PROFILETAG",
    "notification":
    { 
        "message":"Hi this is a push notification", 
        "title": "Rio", 
        "android": {"payload": {"sound": "false","badge": "1"}}, 
        "ios": {"payload": {"sound": "true","badge": "1}}
    }
}

Any idea to fix this issue would be a great help!

mhartington commented 8 years ago

This isn't really the place for this kind of question. Please use the forum.