When the screen turns off, my application service is paused.
I start my service with the following code:
if (mSharedPrefs.getBoolean("prefAutoUpdatesMain", false)) { Intent svc = new Intent(this, MyService.class); startService(svc); }
How can I avoid a service pause?
What I need to do in MyService is to download some data from the Internet. If I realized that I had to perform the following process:
- The acquisition of wakeLock
- Data loading
- Release wakelock
When loading the data method, there is no link to wakeLock, this application has wakeLock, is it correct?
Tuesday locks are considered the default. I think it's better to wakeLock without reference counting to free it, am I wrong?
android service
kristby May 22 '11 at 22:34 2011-05-22 22:34
source share