今天,讲讲如何跳转到小米手机的神隐模式。


传统做法:

public void openBigGodMode(View v){   Intent intent = new Intent();   intent.setComponent(new ComponentName("com.miui.powerkeeper",         "com.miui.powerkeeper.ui.HiddenAppsContainerManagementActivity"));   startActivityForResult(intent,GOD_MODE_ALL);}



这样,只是跳转到所以设置app神隐模式的设置界面。如果想跳转到具体app应用的设置界面,那怎么办?其实也很简单。


最好的做法:(用户体验最佳)

public void openGodMode(View v){   Intent intent = new Intent();   intent.setComponent(new ComponentName("com.miui.powerkeeper",         "com.miui.powerkeeper.ui.HiddenAppsConfigActivity"));   intent.putExtra("package_name", "app的包名(应用id)");   intent.putExtra("package_label", "app名称");   startActivity(intent);}


这样就直接跳转到app的设置神隐模式的界面。但是需要注意小米的android 版本应该大于6.0,不然可能不能跳转。


android 跳转到小米手机神隐模式就讲完了。


就这么简单。

更多相关文章

  1. Android(安卓)TextView设置一个或多个关键字的颜色
  2. android 启动延迟加载画面
  3. Android标题栏各种设置
  4. 隐藏Android底部的虚拟按键
  5. Android(安卓)解决阿里云直播水印问题
  6. Android调用Webview中的js方法
  7. Android(安卓)图片缩放实例详解
  8. Android(安卓)Retrofit 笔记之一使用拦截器设置缓存
  9. Android(安卓)Camera中参数设置

随机推荐

  1. Android 实现下载限速跟下载网速统计
  2. AndRoid Notification的清空和修改
  3. Android客制化------开机拷贝文件到内置
  4. 第一行代码 Android
  5. Android MVP Contract
  6. Android(安卓)进程保活
  7. Android中RadionButton与CheckBox的应用
  8. android客户端与服务器端交互 如何保持se
  9. android 反编译和代码解读
  10. Android 图标右上角添加数字提醒