Keep running android service continuously
-
How to keep running my android service if my app is not running ?
-
Answer:
Just dont call stopSelf(); inside service or context.stopService(new Intent(context, YourService.class)); with in your application and it will not finish your service till the Android meets low memory situations or get restarted.
vishwa at Stack Overflow Visit the source
Other answers
In the onStartCommand() method in your Service, you will want to return the value START_STICKY. This tells the system to keep running your service until either stopSelf() or stopService(YourService) is called. The http://developer.android.com/reference/android/app/Service.html discuss this in lots more detail/precision.
mfrankli
Related Q & A:
- how to clear the running app in android?Best solution by Stack Overflow
- how to Kill running applications on Android?Best solution by Stack Overflow
- How to manage android service?Best solution by support.google.com
- How to check if application is still running on Android?Best solution by Stack Overflow
- Why do I keep running out of disk space?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.