Reputation: 506
The requirement is for an enterprise application. The application will be started on device boot. It will be running in the background and the user should not be able to disable or Stop the application. In Android a user can go to Settings->Application->Manage Application and stop my application. Is there any way to prevent this from happening?
Upvotes: 1
Views: 992
Reputation: 1066
You can not make your application live forever, but it depends on what you really want to do. It's possible to receive a lot of events of the mobile and execute code even if your Activity/Service is not running. You can use BroadcastReceivers
to look for interesting events and then start a service. I do it for an Enterprise Application that sends an event to a main server when the user has received/made a call.
Upvotes: 1
Reputation: 27727
No there is not. You can prevent Android from stopping the application by utilizing a Service and marking it as a foreground service, though this will require your application to display an icon in the status bar.
Upvotes: 1