列出安装/ android的编程方式运行的应用程序 [英] List out installed/running applications in android programmatically

查看:100
本文介绍了列出安装/ android的编程方式运行的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
  <一href="http://stackoverflow.com/questions/2695746/how-to-get-a-list-of-installed-android-applications-and-pick-one-to-run">How才能安装Android应用程序的列表,并选择一个运行

我们已经使用Android手机。

We have using a android mobile.

  1. 如何列出所有安装的应用程序
  2. 如何列出所有正在运行的应用程序
  1. How to list out All Installed Applications.
  2. 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);

从推介:<一href="http://stackoverflow.com/questions/2695746/how-to-get-a-list-of-installed-android-applications-and-pick-one-to-run">How才能安装Android应用程序的列表,并选择一个运行

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

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

Refered从:<一href="http://www.dreamin$c$c.net/forums/topic/138412-android-20-list-of-running-applications/">http://www.dreamin$c$c.net/forums/topic/138412-android-20-list-of-running-applications/

这篇关于列出安装/ android的编程方式运行的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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