3

How can retrieve the following information from the manifest of an installed application?

activity android:label="Movie Player" 
android:name=".MoviePlayer"
Blumer
  • 5,005
  • 2
  • 33
  • 47
lars
  • 31
  • 2

2 Answers2

3

The PackageInfo class gives access to the contents of a manifest, it contains ActivityInfo objects (among others) which have the fields you need.

molnarm
  • 9,856
  • 2
  • 42
  • 60
  • Mi dispiace che mi può aiutare? Ho provato: ApplicationInfo a = null; String name = a.className; tv2.append (nome); – lars Oct 20 '12 at 15:00
  • Here's a short example for using the PackageInfo class: http://stackoverflow.com/questions/9557108/access-android-manifest-attributes-in-java. What are you trying to do? – molnarm Oct 20 '12 at 20:50
  • I would like to read: - - – lars Oct 21 '12 at 02:50
  • I would like to read the following attributes of the manifest of an app installed: – lars Oct 21 '12 at 03:12
  • PackageInfo pack = null; ActivityInfo [] info = pack.activities; To use it tells me to set the flag GET_ACTIVITIES, but I do not know how.How to take hours information from the array of ActivityInfo? – lars Oct 23 '12 at 15:12
1

To read the application label from manifest use PackageInfo Class

Kotlin Code

packageManager.getPackageInfo(packageName,0).applicationInfo.nonLocalizedLabel.toString()
Rohan Pawar
  • 1,875
  • 22
  • 40