Get active Application name in Android

后端 未结 3 1310
一生所求
一生所求 2020-12-05 05:52

I am trying to make a program that shows all the active applications.

I searched everywhere but could only find code that shows the package name onl

3条回答
  •  旧巷少年郎
    2020-12-05 06:08

    If you are getting the package name, you should be able to get additional information about the application using the PackageManager:

    http://developer.android.com/reference/android/content/pm/PackageManager.html

    There are direct methods for getting the application icon, ApplicationInfo and ActivityInfo objects. Off the top of my head I don't know which one would direct you to the readable name, but if its not directly accessible through one of the methods here, it should be accessible from the application resources (also accessible from this class).

提交回复
热议问题