Sorry for my english. I spend meny timis for fix this bug but i cant do this, i dont know why i cant get data which get from server. I have extends IntentService
class, they pase data for push.
I parse lke this:
@Override
protected void onHandleIntent(Intent intent) {
Bundle data = intent.getExtras();
String login = data.getString("login"); //null
}
if i use extends FirebaseMessagingService
everething fine. I get data, i parse like this:
public void onMessageReceived(RemoteMessage remoteMessage) {
String login = remoteMessage.getData().get("login");
}
But i cant use FirebaseMessagingService
becouse when i close app, Firebase create own notification whitout my data. My qestion: how parse date when extends from IntentService
?
server send to firebase json like this:
{
"to":"/topics/news",
"notification":{
"title":"test",
"body":"Test",
"icon":"icon_notf"
},
"data":{
"login":"test"
},
"priority":10
}