如何阻止应用程序在启动器中运行?
我创建了一个启动器应用程序“MyOwnLauncher”和另一个andoid应用程序“MyOwnProject”。 用户可以选择默认的 Android 启动器或我的自定义启动器“MyOwnLauncher”。
如果用户选择默认启动器,我想阻止用户运行“MyOwnProject”应用程序。 我只想允许用户运行“MyOwnProject”应用程序(如果它来自我的自定义启动器“MyOwnLauncher”)。
我成功创建了自定义启动器应用程序“MyOwnLauncher”,并在自定义启动器主页活动中显示了“MyOwnProject”应用程序图标。如果用户单击该图标,应用程序就会运行。 [我正在关注医生。 http://developer.android.com/resources/samples/Home/index.html]
如果不是来自我的自定义启动器应用程序“MyOwnLauncher”,如何阻止用户运行“MyOwnProject”应用程序?
提前致谢。 罗马
I have created a launcher application "MyOwnLauncher" and another andoid application "MyOwnProject".
User has option to select default android launcher or my custom launcher "MyOwnLauncher".
I want to prevent the user to run "MyOwnProject" application, if the user selects the default launcher.
I only want to allow user to run "MyOwnProject" application, if it is from my custom launcher "MyOwnLauncher".
I successfully created my custom launcher application "MyOwnLauncher" and displayed my "MyOwnProject" application icon in my custom laucher home activity. The application runs if the user clicks on the icon. [I am following the doc. http://developer.android.com/resources/samples/Home/index.html]
How can I prevent the user to run "MyOwnProject" application if it not from my custom launcher application "MyOwnLauncher"?
Thanks in advance.
Romah
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定我是否理解,但您可以通过
从
AndroidManifest 中所有活动的
。
部分中 删除,使您的应用程序不会显示在任何应用程序启动器中I'm not sure I understand, but you can make it so your app does not show in any app launchers by removing
from the
<intent-filter>
section in all activities in yourAndroidManifest
.你不能这样做,但更重要的是,你不应该这样做!类似的东西会被视为膨胀软件。
You can't but more important, you shall not do that! Stuff like that is treated like bloatware.