Reputation: 31
How can i make my app run in background ? If it closes the screen nothing should change, and if the screen is on also it doesn't change. I want to be able to recognize my voice when is on onPause().
Upvotes: 1
Views: 240
Reputation:
You definitely need a background service but there are few types of services, read this article and decide what is your requirement, and what type of service you will need. Mainly there are two types of services Service
and IntentService
, both are almost same.
One other thing, system can kill service if it need resources, so, there is a solution which is foreground service, you can also use that.
A foreground service is a service that's considered to be something the user is actively aware of and thus not a candidate for the system to kill when low on memory
Upvotes: 2