get Package Info - Android android.content.pm

Android examples for android.content.pm:PackageManager

Description

get Package Info

Demo Code

import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;

public class Main {

  public static PackageInfo getPackageInfo(Context context,
      String archiveFilePath) {/* w w  w. j a v a 2 s  . c  o  m*/
    PackageManager pm = context.getPackageManager();
    return pm.getPackageArchiveInfo(archiveFilePath,
        PackageManager.GET_ACTIVITIES);
  }

}

Related Tutorials