I am working on app that check some of the status of phone every 5 seconds. I done it that:
Thread checking = new Thread() {
public void run(){
while( <<some status>> ) {
<<checkstatus and do something>>
Thread.sleep(5000);
}
}
}
This is bad for the battery? How can I do it in the other way? Service stop working after couple seconds.