I would like to know why the Service
does not start when the device completes the boot.
I wish that when the device boots, the Service
starts, but this does not happen because to start it I have to open the application first.
Here is my code so far:
public class BootService extends BroadcastReceiver{
Intent intent;
@Override
public void onReceive(Context context, Intent intent2) {
intent = new Intent(context, MyService.class);
context.startService(intent);
}
}