R
R
Rinat2018-05-01 17:51:53
Android
Rinat, 2018-05-01 17:51:53

Socket.io and notification, how to connect?

Greetings Guru, tell me or maybe there are some sketches. I recently started learning android, wrote a chat on Socket.io, everything works well, correspondence between the web and android client, everything works fine. I found the service fastened, it restarts itself in case of departure. screwed the socket there so that with new messages in the chat it would notify in the blind. but here's the problem, how to solve such a problem if I don't show a notification in the chat only when I'm not in the program,
help someone with what you can
UPD: I thought maybe through SharedPreferences write settings during startup and exit from Activate

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question