Here you can find the source of getSignatures(final Context context)
private static Signature[] getSignatures(final Context context) throws PackageManager.NameNotFoundException
//package com.java2s; //License from project: Apache License import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.Signature; public class Main { private static Signature[] getSignatures(final Context context) throws PackageManager.NameNotFoundException { PackageInfo packageInfo = context.getPackageManager() .getPackageInfo(getPackageName(context), PackageManager.GET_SIGNATURES); Signature[] signatures = packageInfo.signatures; return signatures; }/*from w ww. j a v a 2 s.c om*/ /** * Get the application package name. * * @param context Context * @return package name */ public static String getPackageName(final Context context) { return context.getPackageName(); } }