Android examples for App:APK Information
get Apk Signatures
//package com.java2s; import android.content.Context; import android.content.pm.PackageManager; import android.content.pm.Signature; import android.text.TextUtils; public class Main { public static Signature[] getApkSignatures(Context context, String apkPath) {//from w ww .j a v a 2 s. c o m if (context == null || TextUtils.isEmpty(apkPath)) { throw new NullPointerException( "Context is null or apk path is null"); } return context.getPackageManager().getPackageArchiveInfo(apkPath, PackageManager.GET_SIGNATURES).signatures; } }