I am writing an application that will show notifications. In general, you need to write a service that will show them when the screen is locked . And also when the application is closed . How to google I do not even understand. background service if you search, then I find about simple services. And I need a difficult one. VK somehow sends them

  • Is it even possible to do this quickly? I can't find anything anywhere, is it forbidden? If you do it means to use holes in the system? One gets the feeling - Flippy
  • Have you tried AlarmManager instead of a service? - Yuriy SPb
  • @Yuriy SPb, already read. But I do not understand how to use it. I need to make a network request every 2 minutes and if the answer corresponds to the form, then show the notification. With AlarmManager can this be turned? A - Flippy
  • In theory, you create a queue of tasks. When the time comes, the intent will come up, your receiver will catch it and there you can do something with code. But I don’t know how it will work in a sleeping phone; I did not try and read - YuriySPb
  • @Yuriy SPb, I'm telling you - nobody did it. There is neither so nor a githabe, not even a lib. I am amazed. - Flippy

1 answer 1

Synchronization will not suit you? https://habrahabr.ru/company/e-Legion/blog/216857/

  • Article in the closet and in general it is not that - Flippy