Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,806,684 Members 48,065 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Restart service after kill

Tip us?
 
SimplicityApks
Old
#11  
SimplicityApks's Avatar
Senior Member
Thanks Meter 327
Posts: 323
Join Date: May 2013
Location: Aachen
Quote:
Originally Posted by Rick Clephas View Post
Look this app says it can't be killed by task managers https://play.google.com/store/apps/d...mobile.applock
Just an idea, it might be possible when your app is a Device Admin with the APIs that you get with that. Though you have to read it yourself, I have no clue about how it works.
The Following User Says Thank You to SimplicityApks For This Useful Post: [ Click to Expand ]
 
Rick Clephas
Old
#12  
Senior Member - OP
Thanks Meter 124
Posts: 196
Join Date: Jul 2014
Quote:
Originally Posted by SimplicityApks View Post
Just an idea, it might be possible when your app is a Device Admin with the APIs that you get with that. Though you have to read it yourself, I have no clue about how it works.
Thanks I will look at that. Most people have my app as Device Admin because that way it can't be uninstalled

Sent from my SM-N9005 using XDA Premium 4 mobile app
 
Rick Clephas
Old
#13  
Senior Member - OP
Thanks Meter 124
Posts: 196
Join Date: Jul 2014
Well I found the solution.
When device admin is enabled the app can't be force-stopped or uninstalled. Then the user can only stop the service and then the onDestroy methode is called so then I can restart the service again. Tanks guys :thumbup:

Sent from my SM-N9005 using XDA Premium 4 mobile app
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes