Android examples for App:Package
get Program Name By Package Name
//package com.java2s; import android.content.Context; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; public class Main { public static String getProgramNameByPackageName(Context context, String packageName) { PackageManager pm = context.getPackageManager(); String name = null;/* w ww .j a va 2 s . c om*/ try { name = pm.getApplicationLabel( pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA)).toString(); } catch (NameNotFoundException e) { e.printStackTrace(); } return name; } }