¡@

Home 

2014/10/16 ¤W¤È 08:21:27

android Programming Glossary: pkgname

Android - How to get an icon of an app?

http://stackoverflow.com/questions/5612233/android-how-to-get-an-icon-of-an-app

inflater.inflate R.layout.item parent false CheckedTextView ctb CheckedTextView row.findViewById R.id.checkText String pkgName com.abc.abc ctb.setText bla bla ImageView iv ImageView row.findViewById R.id.image List PackageInfo pkgs activity.getPackageManager.. PackageInfo pkgs activity.getPackageManager .getInstalledPackages 0 for PackageInfo p pkgs if p.packageName.equals pkgName Drawable d p.applicationInfo.loadIcon pm iv.setImageDrawable d return row And i am sure i am trying something stupid in..

How to catch or receive android os ' broadcasts' of installed applications?

http://stackoverflow.com/questions/6717067/how-to-catch-or-receive-android-os-broadcasts-of-installed-applications

String actionStr intent.getAction if Intent.ACTION_PACKAGE_ADDED.equals actionStr Uri data intent.getData String pkgName data.getEncodedSchemeSpecificPart handle package adding... ... P.S this is my first post in this website wish it can help...

Android Lock Apps

http://stackoverflow.com/questions/7248080/android-lock-apps

0 1000 And here is the ApkInfo.getInfoFromPackageName Get the ApkInfo class of the packageName requested @param pkgName packageName @return ApkInfo class of the apk requested or null if package name doesn't exist @see ApkInfo public static.. apk requested or null if package name doesn't exist @see ApkInfo public static ApkInfo getInfoFromPackageName String pkgName Context mContext ApkInfo newInfo new ApkInfo try PackageInfo p mContext.getPackageManager .getPackageInfo pkgName PackageManager.GET_PERMISSIONS.. pkgName Context mContext ApkInfo newInfo new ApkInfo try PackageInfo p mContext.getPackageManager .getPackageInfo pkgName PackageManager.GET_PERMISSIONS newInfo.appname p.applicationInfo.loadLabel mContext.getPackageManager .toString newInfo.pname..