Here you can find the source of getAppKey(Context context)
public static String getAppKey(Context context)
//package com.java2s; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.os.Bundle; public class Main { public static final String KEY_APP_KEY = "JPUSH_APPKEY"; public static String getAppKey(Context context) { Bundle metaData = null;/*from w w w. j a va2 s . c o m*/ String appKey = null; try { ApplicationInfo ai = context.getPackageManager() .getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA); if (null != ai) metaData = ai.metaData; if (null != metaData) { appKey = metaData.getString(KEY_APP_KEY); if ((null == appKey) || appKey.length() != 24) { appKey = null; } } } catch (NameNotFoundException e) { } return appKey; } }