如何以编程方式获取Android设备中已安装的浏览器应用程序的列表(包名称) [英] How to get the list of installed Browser Apps in an Android Device Programmatically (Package Names)

查看:180
本文介绍了如何以编程方式获取Android设备中已安装的浏览器应用程序的列表(包名称)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何以编程方式获取Android设备中已安装的浏览器应用程序包名称的列表,以便我必须在移动设备中显示浏览器应用程序的列表.

How to get the list of Installed Browser Apps Package Names in an Android Device Programmatically, So that I have to show the list of Browser Apps in my Mobile.

推荐答案

创建一个Intent描述您要匹配的活动类型.将其传递给PackageManager上的queryIntentActivities(). ResolveInfo对象的结果列表包含活动的详细信息—.及其相关的应用程序—与Intent匹配的.如果列表为空,则没有匹配项.

Create an Intent that describes the type of activity that you want to match. Pass that to queryIntentActivities() on a PackageManager. The resulting list of ResolveInfo objects contains details of the activities — and their associated apps — that match the Intent. If the list is empty, there are no matches.

这篇关于如何以编程方式获取Android设备中已安装的浏览器应用程序的列表(包名称)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆