I have developed a mdm server (mobile device manager) and an android application. I have manage to connect the two devices. In addition, I have wrote an android application ,which can work on any android platform. Now, I am trying to manage android application in a way it can not be closed without permission of me.In other words, android application will run from start of the cell phone until I have send a command to close itself.
I do not manage how I can do that. If you know, can you share your knowlege ?
It is impossible to have never ending applications on Android.
Whenever the system requires more resources for the current foreground task, it will kill background processes to free up RAM and CPU.
However, you could do one of the following:
Return START_STICKY or START_REDELIVER_INTENT using a Service
In your onStartCommand() for your service, return START_STICKY or START_REDELIVER_INTENT
Use a push notification service like GCM to trigger your app’s launch only when needed
This is a much more battery efficient method, as your app isn’t running when it isn’t required. By integrating GCM, you have the ability to send push notifications to your app via the Google Services already installed on every Google approved Android device (anything with Google Play on it). When the device receives your notification, it will launch and notify your application on the device, hence starting it.