I am modifying the AOSP source code because my app needs to run in a kiosk environment.

我正在修改AOSP源代码,因为我的应用程序需要在kiosk环境中运行。

I want Android to boot directly into the app. I've excluded launcher2 from generic_no_telephony.mk, and added the app there. Now Android prompts me all the time to choose default launcher.

我想让Android直接引导到应用程序中。我把launcher2从generic_no_telephony排除了。然后添加了这个应用。现在Android一直提示我选择默认启动。

The two choices that are available on the pop-up:

弹出窗口有两个选项:

  1. Home Sample
  2. 家样本
  3. My app.
  4. 我的应用程序。

How can I exclude the Android Home Sample Launcher? Or is there another way to set the default launcher in an AOSP build?

我如何排除Android家庭样本发射器?或者是否有另一种方法可以在AOSP构建中设置默认启动程序?

3 个解决方案

#1


12

Instead of modifying the AOSP make files (which is annoying because then you need to track your changes) it is easier to add a LOCAL_OVERRIDES_PACKAGES line to your app's make file.

与其修改AOSP make文件(这很烦人,因为您需要跟踪更改),不如在应用程序的make文件中添加LOCAL_OVERRIDES_PACKAGES行。

For instance:

例如:

LOCAL_OVERRIDES_PACKAGES := Launcher2 Launcher3

added to your Android.mk file will ensure that those packages are not added to any build where this package is added.

添加到您的安卓。mkfile将确保这些包不添加到添加该包的任何构建中。

Following that, you should do a

接下来,你应该做一个

make installclean

and then start your build the same way you always make your build. The make installclean is important to remove the packages that are left behind by the previous build.

然后开始你的构建,就像你一直做你的构建一样。make installclean对于删除先前构建遗留下来的包非常重要。

I also just found a nice answer to how to do this in another question, see: How would I make an embedded Android OS with just one app?

我还在另一个问题中找到了一个很好的答案:如何用一个应用程序制作一个嵌入式Android操作系统?

更多相关文章

  1. 第三部分:Android 应用程序接口指南---第二节:UI---第六章 对话框
  2. 如何将本机应用程序(android)与phonegap应用程序集成
  3. 为什么我的Android应用程序偶尔可以非常快地耗尽电池?
  4. 如何在android 5.0(L)中运行应用程序活动名称?
  5. Android应用程序启动过程上
  6. Java Android套接字连接。错误的IP地址导致应用程序停止响应
  7. Android 为你的应用程序添加快捷方式【优先级高的快捷方式】
  8. 添加脚本到Android应用程序
  9. 如何使用java RESTful Web服务将通知推送到Android应用程序

随机推荐

  1. Flutter开始干系列-一个完整的登录实践
  2. android:windowSoftInputMode的说明
  3. ubuntu9.04上android sdk 1.5 安装与配置
  4. Android修改user版本默认关闭开发者选项
  5. TabHost+Fragment分析
  6. Android 在程序界面上显示图片
  7. android configChanges
  8. android定位功能(二)
  9. Android工具库
  10. Android 6.0 Ethernet流程分析记录