I am sending data payload notifications from my server. here is example:
url= "https://fcm.googleapis.com/fcm/send"
{
"to" : "userToken",
"data" : {
//some json here
}
}
in such way i am successfully sending messages to users, even if app isn't running, in all pre Android O devices. But on Android O device, onMessageReceived not called when app is not launched...
is there some new rules in O ? how it can be fixed? thanks!
UPDATES
This question is not about notifications, but about firebase message srvice!
Anyway, chanels for Android O is also implemented:
val CHANEL_ID = "MY_CHANEL_ID"
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val channel = NotificationChannel(CHANEL_ID, "Channel human readable title", NotificationManager.IMPORTANCE_HIGH)
(getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager).createNotificationChannel(channel)
}