Apocalypse480
Lurker
Hi guys, I am new on Android developing.
I am developing a sort of IM service similar to whatapp just for fun.
I want to have a service in background to query the server and retrieve messages from it, but I have some problems with JobService.
Yeah, I've read that the old BackgroundService doesn't work anymore on newer version of Android and it's substitute is the JobScheduler system service.
Now, I wonder how Whatsapp does to retrieve messages in background approximately in realtime.
How can I create a JobService executed each second?
I am waiting for answers!
Thanks in advance!
P.S. I tried setPeriod() but since Nougat it doesn't work well anymore, so the suggested workaround is to use setMinimumLatency(), however it doesn't exactly repeat in the time speciefied and I wonder why this...
I am developing a sort of IM service similar to whatapp just for fun.
I want to have a service in background to query the server and retrieve messages from it, but I have some problems with JobService.
Yeah, I've read that the old BackgroundService doesn't work anymore on newer version of Android and it's substitute is the JobScheduler system service.
Now, I wonder how Whatsapp does to retrieve messages in background approximately in realtime.
How can I create a JobService executed each second?
I am waiting for answers!
Thanks in advance!
P.S. I tried setPeriod() but since Nougat it doesn't work well anymore, so the suggested workaround is to use setMinimumLatency(), however it doesn't exactly repeat in the time speciefied and I wonder why this...