从 Android 应用程序选择器中隐藏应用程序
你好 我创建了一个应用程序(BookReader)来解析并显示某本书(作为默认书籍给出)。 但是,如果我只是复制设备上的任何其他书籍并尝试打开它,Android 会显示可以打开我的书籍的建议安装应用程序列表。在这些建议的应用程序中,还有我的应用程序(BookReader),如果选择它,它会打开该书。 如何设置我的应用程序,使其不会出现在建议的 Android 应用程序列表中?因为我不希望我的应用程序被用来打开其他书籍。只是默认的那个。
谢谢
注意!我希望它出现在应用程序列表中。我只是不想显示为打开其他书籍或文件的应用程序建议。
Hi
I created an application (BookReader) that parses and displays a certain book (given as the default book).
But if I simply copy any other book on my device and attempt to open it, android displays a list of suggested installed applications that can open my book. Among these suggested applications is my app (BookReader) too and if selected it opens that book.
How can set my app so it won't appear in the suggested android apps list? Because I don't want my app to be used for opening other books. Just the default one.
Thanks
NOTE! I want it to appear in the application list. I just don't want to appear as a app suggestion for opening other books or files.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
谢谢你们!
我通过删除清单文件中的 mimeTypes 来解决这个问题,这些 mimeTypes 位于意图过滤器内,与打开这些文件格式的操作相匹配。
希望这也对其他人有帮助
thanks guys!
I solved it by removing the mimeTypes in the manifest file which were inside the intent-filter that was a match for the action of opening those file formats.
Hope this helps others too
您的应用程序可能正在注册与任何书籍所使用的意图相匹配的意图。您可能想修改 IntentFilter 以缩小范围,以某种方式仅匹配您的特定书籍。你的书产生了什么意图?
Your application is probably registering for an intent that matches the intent used by any book. You probably want to modify your IntentFilter to narrow the scope to only match your specific book somehow. What intent does your book generate?
您需要修改 AndroidManifest.xml 以删除侦听书籍的 IntentFilter。如果您粘贴此文件的内容,我可以提供更准确的详细信息。
您是否使用开源电子书阅读器并尝试将各个书籍打包为自己的应用程序?
You will need to modify the AndroidManifest.xml to remove the IntentFilter that listens for books. If you paste the contents of this file, I can provide more exact details.
Did you take an open source eBook reader and try to package individual books as their own applications?