M
M
Maxim Firsov2018-08-13 21:37:50
Java
Maxim Firsov, 2018-08-13 21:37:50

Android: push with images in background mode how?

Good afternoon! Found that Instagram sends push notifications with photos when the application is definitely killed. Android8 how can this be done for background mode (foreground is not a problem)?
Sincerely.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AlexeyID, 2018-08-13
@AlexeyID

What exactly is the problem?
In android there is such a thing as a service, the service will continue to work even if the application is closed.
If you are using firebase, you need to create a class and inherit it from the FirebaseMessagingService service, then accept the data in the onMessageReceived method and display it as you need, or perform other manipulations. Also here you can predefine the method that will be called when the token is changed (Read the firebase documentation)
You can read more about this on the net

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question