Create Android Service which no "Task Killer" application can kill -


i want create service no "advance task killer" can kill, or if kills restart again.

i tried below scenarios didn't work :

  1. start_sticky
  2. registering receiver sms (unfortunately won't work on tablets)

can suggest code ?

you can try using ondestroy() method of android services, restart service once killed.

    @override     public void ondestroy() {             intent serviceintent = new intent(context, myservice.class);             context.startservice( serviceintent );     } 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -