禁止应用开机启动
使用 adb shell pm disable {bootcomplet_receiver_component_name}, 需要 root 权限
?
参考?http://pastebin.com/8rvNQMv2
?
enable/disable 自己应用里的某个组件,可以使用
/* Set the enabled setting for a package component?
(activity, receiver, service, provider). */
abstract void setComponentEnabledSetting(ComponentName componentName,?
int newState,?
int flags)
比如:打开/关闭 开机启动,可以使用这个上面的方法 enable/disable 接收?android.intent.action.BOOT_COMPLETED 广播的 BroadcastReceiver。
?