Most of you must have used "whatsapp" and "viber". These apps constantly keep running even when they are exited. I want one of my activities to keep running in the background after its being ran for the first time. And I also want the whole app to keep running in the background like viber and whatsapp do. How can I do that?
Asked
Active
Viewed 2.3k times
1
-
1You need to create a service. http://developer.android.com/guide/components/services.html – Erik Nedwidek May 12 '13 at 18:03
-
Movetasktoback(true); ... use this – Noman Sep 08 '14 at 12:40
2 Answers
3
-
I'm using a 3rd-party which I don't have control and only works with an activity but not a service. What should I do? – Michael Tsang Sep 22 '20 at 05:07
3
It's not the Activity
that keeps running in the background but a Service
. Look at http://developer.android.com/reference/android/app/Service.html for implementing it.

deekay
- 681
- 4
- 17