I have an app that should show headsup notification while the app is in both foreground and background(not in history).
In foreground case , i acheived this by the folowing method.
PendingIntent pendingIntent = PendingIntent.getActivity(ctx, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Builder builder = new NotificationCompat.Builder(ctx);
builder.setFullScreenIntent(pendingIntent,true);
But in background, it always showing in the notification area.Can anybody tell how to acheive this in background(not in history)
i tried the below parameters for notification but not working.
{
"to" : "_Token_",
"priority":"high",
"data":
{
"title": "Test",
"text": "Fcm"
},
"notification":
{
"title": "Test",
"text": "Fcm"
}
}