I have developed app using Ionic Framework, and implemented GCM push notification using this plugin, it is working fine with the device of android version below 4.4 (kitkat), i am able to see notification icon.
But devices with android version more than 5.x (lolipop) notification icon is not visible.
Here is my ctrl code,
var pushNotification = window.plugins.pushNotification;
pushNotification.register(successHandler, errorHandler,
{
'senderID': 'xxxx', 'icon': 'icon', 'ecb': 'onNotificationGCM'
});
function onNotificationGCM(e) {
switch (e.event) {
case 'registered':
if (e.regid.length > 0) {
registerDeviceForNotification();
}
break;
case 'message':
if (e.foreground) {
// When the app is running foreground.
}
}
$rootScope.notificationCount = $rootScope.notificationCount + 1;
break;
case 'error':
console.log('Error: ' + e.msg);
break;
default:
console.log('An unknown event was received');
break;
}
}
Any help will be appreciated.