How can I autostart my application\'s service at device boot (with the possibility of enabling/disabling this feature)? What permissions do I have to include in AndroidManif
this permission are use
In your
In MyBroadcastReceiver.java:
package com.example;
public class MyBroadcastreceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Intent startServiceIntent = new Intent(context, MyService.class);
context.startService(startServiceIntent);
}
}
for more help :: http://www.androidcompetencycenter.com/2009/06/start-service-at-boot/ http://blog.gregfiumara.com/archives/82 http://androidgps.blogspot.com/2008/09/starting-android-service-at-boot-time.html