首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

禁止施用开机启动

2012-09-22 
禁止应用开机启动使用 adb shell pm disable {bootcomplet_receiver_component_name}, 需要 root 权限?参

禁止应用开机启动

使用 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。

?

热点排行