摘要:
public class BootCompleteReceiver extends BroadcastReceiver { public void onReceive(Context context, Intent intent) { Toast.makeText(context,"Boot Complete",Toast.LENGTH_SHORT).show(); ... 阅读全文
摘要:
思路:创建一个类继承BroadcastReceiver类,在里面重写onReceive()方法,把接收到广播后需要添加的逻辑写在方法内public class MainActivity extends AppCompatActivity private Broad broad; private In 阅读全文