automatically run an application on Android phone startup

后端 未结 4 1421
一整个雨季
一整个雨季 2020-12-18 16:59

I want to start my application when phone startup

I just follow tutorial from here but it doesn\'t work in my device. Please see my method:

public c         


        
4条回答
  •  臣服心动
    2020-12-18 17:43

    You are not calling the Service.

    Code like this.

    Intent objIntent= new Intent(context, MyService.class);
    context.startService(objIntent);
    

    Click Here to know how to start service from broadcast receiver

提交回复
热议问题