I am working on an application related to Voip & IM (chatting application). Till android OS 5.0 it is working good and no issues from client also. But from android OS 5.1.1 onwards we are facing issues.
Issues:
- If the app is in foreground and if device goes to sleep mode it is working good.
- If the app is in background and if device goes to sleep mode after 10 minutes all the services are stopping automatically.
Testing:
For testing I created one timer task to print logs for every 1 minute. So when I close the application (means if the app is in background)
Till android OS 5.0 logs are printing continuously.
From android OS 5.1.1 onwards after going to sleep mode, after 10 minutes logs are not printing. Timer task is stopping
Same problem I am facing for my application also.
After doing some R&D I came to know regarding doze mode and app optimization. Is it anyhow related to stop services automatically running in background.
If yes, can anyone please let me know how to overcome this issue.