列出安装/ android的编程方式运行的应用程序应用程序、方式、android

2023-09-04 06:10:08 作者:心还未成年

可能重复:   How才能安装Android应用程序的列表,并选择一个运行

我们已经使用Android手机。

We have using a android mobile.

如何列出所有安装的应用程序。 如何列出所有正在运行的应用程序。 How to list out All Installed Applications. How to list out All Running Applications.

帮助我。谢谢你。

推荐答案

要获得安装在Android活动/应用程序的列表:

final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
final List pkgAppsList = context.getPackageManager().queryIntentActivities( mainIntent, 0);

从推介:How才能安装Android应用程序的列表,并选择一个运行

要检查所有正在运行的应用程序

ActivityManager actvityManager = (ActivityManager)
this.getSystemService( ACTIVITY_SERVICE );
List<RunningAppProcessInfo> procInfos = actvityManager.getRunningAppProcesses();

Refered从:http://www.dreamin$c$c.net/forums/topic/138412-android-20-list-of-running-applications/