Android app halt prcess when phone goes sleep

147 Views Asked by At

I am making a simple Android app that monitors a server status and sends an SMS when something is wrong. It is working fine when the phone is awake, but as soon as the phone goes to sleep, the app sort of freezes immediately. How to make the app continue to do its job when in sleep?

Android version is 5.1.1

0

There are 0 best solutions below