Tuesday, February 23, 2016

Application Metadata in Android


After long time, in this post i would help on retrieving the metadata about all the application installed in the mobile app. And also to retrieve all the requested permissions of each app.

You would need to use package manager to get handle of ApplicationInfo and PackageInfo class for this. In your code use the below snippet to get list of ApplicationInfo objects for all the installed applications in the device.

ArrayList<ApplicationInfo> pkgAppsList = (ArrayList<ApplicationInfo>)this.getPackageManager().getInstalledApplications(PackageManager.GET_META_DATA);

Iterate the list and use loadlabel and loadicon method to get basic name of the app and icon image of the app. Refer here for list of methods in applicationinfo class.

To get the permissions each app has requested and all package metadata, get the packgeinfo object as below

PackageInfo packageInfo = context.getPackageManager().getPackageInfo("packageName", PackageManager.GET_PERMISSIONS);

PackageInfo has field requested permissions which will provide list of all permissions. Refer here for PackgeInfo fields and methods appropriate for your app.

packageInfo.requestedPermissions

Tuesday, January 12, 2016

Training on Java/J2EE technologies:

  • Enterprise Java Beans 3
  • Hibernate
  • JPA
  • Struts
  • JBoss
  • Ajax
  • Mongo DB
  • Design Patterns
  • Android
  • AngularJS
  • Web programming
  • Phonegap
Interested for any of the training's below, Please contact me at msmechatronics@gmail.com.

Training Highlights:

* Real time examples
* Hands on training
* Exclusive learning materials