Java tutorial
//package com.java2s; //License from project: Apache License import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.text.TextUtils; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static String a(Context var0) { String var1 = var0.getPackageName(); String var3; try { ApplicationInfo var2 = var0.getPackageManager().getApplicationInfo(var1, PackageManager.GET_META_DATA); var3 = var2.metaData.getString("TencentMapSDK"); if (!TextUtils.isEmpty(var3)) { String var4 = "[&=]"; Pattern var5 = Pattern.compile(var4); Matcher var6 = var5.matcher(var3); var3 = var6.replaceAll(""); } } catch (PackageManager.NameNotFoundException var7) { var3 = "GRYBZ-ACPWV-UIGPO-U2SRZ-KRYB6-7VFTU"; } return var3; } }