R
R
Rinat2019-03-27 19:01:23
Android
Rinat, 2019-03-27 19:01:23

FireBase how to send push from server to android?

I took an example here https://gist.github.com/prime31/5675017 but I have a problem. wrote a push handler, when the application is opened or minimized, a notification arrives. but when closed/killed the push doesn't come. I've already tried a lot of options.
All the same, I do not understand, should it come when the application is closed? either not, or via php does not come

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
g_s_e, 2019-03-27
@g_s_e

android should receive a push if the application is minimized, since FireBase sends a notification to the background stream of the device, on IOS it stops moving after a while, after the application is minimized, because on IOS, the background stream of the application is cut down after a certain period of time (5-10 minutes, due to the limitation of the system itself). From the server side (PHP), establishes a connection, with FireBas, in the case of android and APN, in the case of IOS, passing connection parameters (application credentials) and recipient parameters, IOS / android of the device, after which The PHP connection is cut off and FireBase takes over the control of sending the push. That is, PHP establishes a connection with FireBase, passes parameters to it, cuts off the connection -> FireBase accepted the parameters, sent a push ->

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question