简体   繁体   English

如何在按下主页时将我的应用设置为默认启动器,作为一项可选功能

[英]how to make my app as default launcher when press home, as an OPTIONAL feature

i want to know if i can set my app as default launcher when i want it to be (not a fixed feature) , because i'm developing babies game ,and i want to put lock buttons as an option so i can handle home button when pressed. 我想知道是否可以将我的应用程序设置为默认启动器(不是固定功能),因为我正在开发婴儿游戏,并且希望将锁定按钮作为选项,以便可以处理主页按钮当按下。 and when the app is finished return the original launcher. 应用完成后,返回原始启动器。 i searched about it in the internet but all i found is to set it as fixed feature in manifest file like this: 我在互联网上搜索了它,但发现的只是将其设置为manifest文件中的固定功能,如下所示:

<intent-filter>
            <action android:name="android.intent.action.MAIN" />
             <category android:name="android.intent.category.HOME"/>
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

So any help 所以有什么帮助

thanx 谢谢

i want to know if i can set my app as default launcher when i want it to be 我想知道是否可以将我的应用设置为默认启动器

No, you cannot. 你不能。 The user can elect to make your app be their default home screen. 用户可以选择使您的应用成为其默认主屏幕。 Malware authors cannot attack users by forcibly replacing their home screen with another implementation. 恶意软件作者无法通过用另一种实施方式强制替换其主屏幕来攻击用户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android启动器按启动器中的主页进入默认屏幕 - Android launcher press home in launcher to go to default screen 如何使Android应用成为平板电脑上的默认启动器 - How to make android app as the default launcher on a tablet 如何将应用程序设为默认系统启动器? - How to make app as a default system launcher? 如何将我的应用程序设置为默认启动器 - How to make my application as default launcher 当我按下主页按钮时,如何使我的Android应用程序(具有蓝牙连接)工作而不会失去连接 - How to make my android app(has bluetooth connection) works without loosing connection when I press home button 如何确保从家启动应用程序时启动器活动始终运行 - How to make sure that the launcher activity always run when the app is launched from the home 按下后,默认启动器不会启动 - Default launcher not launching when press back Android Launcher应用程序:是否可以向用户提供各种家庭新闻活动? - Android Launcher app: Is it possible to supply the user with different activities on home press? 为什么我的android启动器会在Home Press上重新打开 - Why does my android launcher re-open on Home Press 当我的应用不是默认启动器应用时,调用“选择启动器”对话框 - Call “select launcher” dialog when my app isn't the default launcher app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM