Android:如何获取所有可用的意图过滤器的列表? [英] Android: How to get a list of all available intent filters?
问题描述
我正在搜索Android文档,并且出于某种疯狂的原因,我无法找到所有可用的意图过滤器的列表.
我正在找到一个意图过滤器,它的作用类似于通过广播接收器通知我某个特定的活动(例如浏览器或电子邮件)已经启动或处于前台.
有人可以帮我吗?
PackageExplorer列出了设备中应用程序中定义的所有意图过滤器
回答您的问题:创建一个意图过滤器,以便在程序寻找服务或活动时选择活动.因此,包中的每个活动都定义了自己的意图过滤器列表.
我发现列出设备上所有应用程序定义的所有意图过滤器的列表很有用-因此可以知道在处理意图时系统将调用哪些应用程序.我在Android Market上放置了一个免费应用程序,搜索"Package Explorer",该程序会搜索它可以在您的设备上找到的所有应用程序,对AndroidManifest.xml文件进行解码,并显示所有应用程序定义的所有意图过滤器的列表.所有意图过滤器的表都可以按操作,类别,数据字段(即方案或mimetype),程序包名称或意图过滤器类型进行排序,这样您就可以在设备上找到响应各种动作或类别的所有Activites.>
Package Explorer还收集清单中的所有使用权限"字段,并显示哪些应用程序需要哪些权限的列表.因此,您可以找到所有使用"SEND_SMS"或类似名称的软件包.单击程序包的名称,将显示该程序包的解码(未压缩的二进制)AndroidManifest.xml.
I have search Android docs and for some insane reason I am not able to find the list of all available intent filters.
I am finding an intent filter, which would do something like notifying me through Broadcast Receiver that a particular Activity (example browser, or email) has been started or in the foreground.
Can anyone help me with that?
PackageExplorer lists all intent-filters defined in apps in your device
To answer your question: You create the intent-filter(s) you want to be used to cause your activity to be selected when a program is looking for a service or activity. So each Activity in a Package defines it own list of intent-filters.
I found it useful to have a list of all intent-filters defined by all the applications on a device -- so would know what apps the system would invoke when an intent was processed. I put a free app on Android Market, search for 'Package Explorer' that searches all apps it can find on your device, decodes the AndroidManifest.xml file and displays a list of all intent-filters defined by all apps. The table of all intent-filters can be sorted by Action, Category, Data fields(ie scheme or mimetype), package name or intent-filter type so you can find all Activites on your device that respond to various Actions or Categories.
Package Explorer also collects all uses-permissions fields in the manifest and displays a list of which apps require which permissions. So you can find all packages that use 'SEND_SMS' or something like that. Clicking on the name of a package displays the decoded (uncompressed binary) AndroidManifest.xml for the package.
这篇关于Android:如何获取所有可用的意图过滤器的列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!