内容简介:设置->应用->应用信息找到应用包名: packageName: com.miui.home使用 android shell取得 android shell中运行dumpsys package 的结果,
设置->应用->应用信息找到应用包名: packageName: com.miui.home
使用 android shell
adb shell
dumpsys package > aa.txt
exit
adb pull /sdcard/aa.txt .
open aa.txt
复制代码
取得 android shell中运行dumpsys package 的结果,
得到 Action, Category
Code in flutter
参考 android_intent 例子,代码如下:
_goMiHome() async {
AndroidIntent intent = AndroidIntent(
action: 'android.intent.action.MAIN',
category: 'android.intent.category.HOME',
package: 'com.miui.home');
await intent.launch();
}
复制代码
flutter 中触发此方法, 即可打开系统桌面.
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
UNIX编程艺术
Eric S. Raymond / 姜宏、何源、蔡晓俊 / 电子工业出版社 / 2006-2 / 59.00元
本书主要介绍了Unix系统领域中的设计和开发哲学、思想文化体系、原则与经验,由公认的Unix编程大师、开源运动领袖人物之一Eric S. Raymond倾力多年写作而成。包括Unix设计者在内的多位领域专家也为本书贡献了宝贵的内容。本书内容涉及社群文化、软件开发设计与实现,覆盖面广、内容深邃,完全展现了作者极其深厚的经验积累和领域智慧。一起来看看 《UNIX编程艺术》 这本书的介绍吧!