FORUMS

Samsung Galaxy Alpha (SM-G850) Gets Android 5.0

An Android 5.0 Lollipop update is finally available to download for the Samsung Galaxy … more

Do You Use 4:3 or 16:9 in the Camera App?

Every person has their own method of taking the best photos on their devices, but which aspect … more

LG G4 XDA Forum Opened

LG’s latest & greatest is just a few hours away from launching, and with so many power users that are … more

Android Wear Close to Running on Samsung Gear 2

Android is an OS that can sometimes be ported to run on devices not designed to … more
Post Reply Subscribe to Thread Email Thread

[Q] Restart service after kill

18th August 2014, 09:01 PM |#11  
SimplicityApks's Avatar
Senior Member
Flag Aachen
Thanks Meter: 340
 
More
Quote:
Originally Posted by Rick Clephas

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: [ View ]
 
 
18th August 2014, 09:03 PM |#12  
OP Senior Member
Thanks Meter: 355
 
Donate to Me
More
Quote:
Originally Posted by SimplicityApks

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
18th August 2014, 10:07 PM |#13  
OP Senior Member
Thanks Meter: 355
 
Donate to Me
More
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
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes