What is happening in Android if I have IntentService defined as following:
public class BackgroundService extends IntentService {
public BackgroundService() {
super("BackgroundService");
}
@Override
protected void onHandleIntent(Intent workIntent) {
run();
}
private void run() {
try {
while(true)
{
//Some expensive Internet & SQL querying stuff
Thread.sleep(1000 * 60 * 60);
}
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
How bad will it drain the battery? I aim for rather fundamental answer (What will happen if I set the sleep to 1 day)?