Java tutorial
//package com.java2s; import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import java.io.File; public class Main { public static PackageInfo getAPKInfo(Context c, File apk) { if (!apk.exists()) return null; String archiveFilePath = apk.getAbsolutePath(); PackageManager pm = c.getPackageManager(); //PackageManager.GET_ACTIVITIES = 1 PackageInfo info = pm.getPackageArchiveInfo(archiveFilePath, 1); return info; } }