android开机自启动app示例分享
来源:互联网 发布:备用域名 编辑:程序博客网 时间:2024/04/29 07:04
/*开机自动启动APP*/
public class BootReceiver extends BroadcastReceiver {@Override
public void onReceive(Context context, Intent intent) {
Log.d("XRGPS", "BootReceiver.onReceive: " + intent.getAction());
if (ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
Intent mBootIntent = new Intent(context, MainActivity.class);
mBootIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(mBootIntent);
} else {
Log.w("XRGPS", "BootReceiver: unsupported action");
}
}
}
public class BootReceiver extends BroadcastReceiver {@Override
public void onReceive(Context context, Intent intent) {
Log.d("XRGPS", "BootReceiver.onReceive: " + intent.getAction());
if (ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
Intent mBootIntent = new Intent(context, MainActivity.class);
mBootIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(mBootIntent);
} else {
Log.w("XRGPS", "BootReceiver: unsupported action");
}
}
}
0 0
- android开机自启动app示例分享
- android开机app自启动
- android开机自启动app
- android开机自启动app
- Android 开机自启动示例程序
- Android 开机自启动示例程序
- Android 实现开机自启动app
- Android开机自启动App(附带源码)
- Android设置App是否开机自启动
- android总结一: 开机自启动APP
- Android开发 设置App开机自启动
- Android 代码设置开机自启动App
- android的APP开机自启动
- app开机自启动
- APP开机自启动
- APP开机自启动
- App开机自启动
- 开机后自启动app
- JS内存泄漏排查
- Java基础知识系列2
- U-Boot 环境变量浅析
- cookie 和session 的区别详解
- 配置 L3 agent - 每天5分钟玩转 OpenStack(99)
- android开机自启动app示例分享
- [NOIP2003] 传染病控制-解题报告
- python __repr__和__str__ 的区别
- 编程过程中如何保持清晰的思路
- 设计模式六大设计原则之三:依赖倒转原则
- Jquery验证
- 测试基础篇之【按钮通用测试点】
- JavaEE学习之路—–JSP(二)
- AsyncTask原理解析