如何列出由应用程序公开的所有活动? [英] How to list all activities exposed by an application?

查看:140
本文介绍了如何列出由应用程序公开的所有活动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我觉得应该可以得到由第三方的应用程序,清单文件中描述的所有活动。 我无法弄清楚如何。

I think that it should be possible to get all the activities from 'third-party' application, described in the manifest file. I can't figure out how.

例如:

List<Activity> aList = packManager.getActivitiesForPackage("package.name");

在此先感谢!

thanks in advance!

推荐答案

您应该能够做到这一点使用<一个href="http://developer.android.com/reference/android/content/pm/PackageManager.html">PackageManager's getPackageArchiveInfo()使用 GET_ACTIVITIES 标志。我不累么寿。

You should be able to do just that using the PackageManager's getPackageArchiveInfo() using the GET_ACTIVITIES flag. I have not tired it tho.

这篇关于如何列出由应用程序公开的所有活动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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