Search code examples
androidpush-notificationsamsung-mobile

Why My Application Badge Icon in home Screen Not showing?


I am developing an application.

My problem is , in samsung s5 with marshmellow and samsung s7 with naugut ,

When I receive push notification from FCM, I can see it in Notification Panel, but in phone's home screen, on App icon - badge - i can not see it. Why?

Even Samsung devices are showing badge icon for Whatsapp and Facebook. But not showing for my application when my application is on killed mode.

This is happening in particular this two devices, but on mi phone it's showing,

I have tried to integrate this library and search many times but , no available :( https://github.com/leolin310148/ShortcutBadger

Can you help me? Thank you in advance.


Solution

  • I found a solution and its working for me.

    Previously, I was using 11.8.0('com.google.firebase:firebase-messaging:11.8.0') for FCM. But I downgrade it to 11.2.0('com.google.firebase:firebase-messaging:11.2.0'). With the help of downgrading, I am able to get access to below method,

    @Override
        public void handleIntent(Intent intent) {
            super.handleIntent(intent);
    // This method will be called even if application is in killed mode.
    }
    

    With the help of 3rd party Badge count library, I am able to show badge count for my application and it's perfectly working for Samsung device.