Push notification not showing on android in notification tray


#1

I have done a custom integration of FCM push notification:

 @Override
public void onMessageReceived(RemoteMessage message) {
    try {
        if (message.getData().size() > 0) {
            Bundle extras = new Bundle();
            for (Map.Entry<String, String> entry : message.getData().entrySet()) {
                extras.putString(entry.getKey(), entry.getValue());
            }

            NotificationInfo info = CleverTapAPI.getNotificationInfo(extras);
            if (info.fromCleverTap) {
                // clevertap notifications come here, but nothing gets displayed on android lock screen
                CleverTapAPI.createNotification(getApplicationContext(), extras);
            } else {
                // handle by other provider
            }
        }
    } catch (Throwable t) {
        Log.d("MYFCMLIST", "Error parsing FCM message", t);
    }
}

I get clevertap notifs on the device, but nothing displays on the android lock screen/notifications tray.

Any advice please?


#2

Anyone going to reply soon from clevertap team please?


#3

I am also facing the same issue.


#4

{
“to”: {

    "FBID":[],
    "GPID":[],
    "Email": [
        "ddy2@mya24.com"
    ],
    "Identity": [],
    "objectId": []
},
"respect_frequency_caps": false,
"content": {
    "title": "Welcome",
    "body": "Hello world to clevertap!",
    "subject": "Sub1",
    "sender_name":"Vivek1",
    "platform_specific": {
        "android": {
            **"wzrk_cid": "my_channel",**
            "key": "value_android"
        }
    }
}

}

May be you are using android O (Oreo and abv)…send channel name and this should work
"wzrk_cid": “my_channel”,