标签:trace str ret pack channel android bsp androi stat
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 UmUtils { /** * 得到友盟的渠道号 */ public static String getUmMetaInfo(Context context) { try { ApplicationInfo ai = context.getPackageManager().getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA); Bundle bundle = ai.metaData; return bundle.getString("UMENG_CHANNEL"); } catch (NameNotFoundException e) { e.printStackTrace(); return ""; } } }
标签:trace str ret pack channel android bsp androi stat
原文地址:http://www.cnblogs.com/loaderman/p/6435179.html