android Programming Glossary: packagemanager.get_meta_data
Android: How can I get current opened application name on screen http://stackoverflow.com/questions/11118721/android-how-can-i-get-current-opened-application-name-on-screen pm.getApplicationInfo info.processName PackageManager.GET_META_DATA Log.w LABEL c.toString catch Exception e Name Not FOund Exception..
Checking a checkbox in listview makes other random checkboxes checked too http://stackoverflow.com/questions/11190390/checking-a-checkbox-in-listview-makes-other-random-checkboxes-checked-too List ApplicationInfo packages pm.getInstalledApplications PackageManager.GET_META_DATA final CopyOfMyCustomAdapter a new CopyOfMyCustomAdapter this..
How to specify Activities that are only for phones or tablets on Android http://stackoverflow.com/questions/13202805/how-to-specify-activities-that-are-only-for-phones-or-tablets-on-android context.getPackageName PackageManager.GET_ACTIVITIES PackageManager.GET_META_DATA .activities for ActivityInfo info activity_info final String..
Intent to launch the clock application on android http://stackoverflow.com/questions/3590955/intent-to-launch-the-clock-application-on-android ActivityInfo aInfo packageManager.getActivityInfo cn PackageManager.GET_META_DATA alarmClockIntent.setComponent cn debug Found vendor packageName..
Get active Application name in Android http://stackoverflow.com/questions/3861073/get-active-application-name-in-android pm.getApplicationInfo info.processName PackageManager.GET_META_DATA Log.w LABEL c.toString catch Exception e Name Not FOund Exception..
Determine list of permissions used by an installed application in Android http://stackoverflow.com/questions/4461504/determine-list-of-permissions-used-by-an-installed-application-in-android try PermissionInfo pinfo mPm.getPermissionInfo permission PackageManager.GET_META_DATA CharSequence label pinfo.loadLabel mPm CharSequence desc pinfo.loadDescription..
Android: How to reset FirstRun SharedPreferences when my app is updated? http://stackoverflow.com/questions/4726283/android-how-to-reset-firstrun-sharedpreferences-when-my-app-is-updated try pInfo getPackageManager .getPackageInfo getPackageName PackageManager.GET_META_DATA if prefs.getLong lastRunVersionCode 0 pInfo.versionCode TODO..
AppWidget PendingIntent not working after Launcher restart http://stackoverflow.com/questions/4909886/appwidget-pendingintent-not-working-after-launcher-restart ActivityInfo aInfo packageManager.getActivityInfo cn PackageManager.GET_META_DATA alarmClockIntent.setComponent cn foundClockImpl true catch..
How can I learn whether a particular package exists on my Android device? http://stackoverflow.com/questions/6758841/how-can-i-learn-whether-a-particular-package-exists-on-my-android-device try PackageInfo info pm.getPackageInfo targetPackage PackageManager.GET_META_DATA catch NameNotFoundException e return false return true share..
How do you add user defined properties/values in to the Android manifest file? http://stackoverflow.com/questions/7928105/how-do-you-add-user-defined-properties-values-in-to-the-android-manifest-file .getApplicationInfo context.getPackageName PackageManager.GET_META_DATA Object value Object ai.metaData.get foo See http developer.android.com..
How to get installed applications permissions http://stackoverflow.com/questions/7937794/how-to-get-installed-applications-permissions List ApplicationInfo packages pm.getInstalledApplications PackageManager.GET_META_DATA for ApplicationInfo applicationInfo packages Log.d test App..
How to kill currently running task in android http://stackoverflow.com/questions/8814696/how-to-kill-currently-running-task-in-android pack.getApplicationInfo packageName PackageManager.GET_META_DATA catch NameNotFoundException e e.printStackTrace packName.add..
Android: How to get a list of installed activities, as they appear in launcher, without duplicates http://stackoverflow.com/questions/9904698/android-how-to-get-a-list-of-installed-activities-as-they-appear-in-launcher List ApplicationInfo apps pm.getInstalledApplication PackageManager.GET_META_DATA and from each element from apps you can get it's package name..
Android: How can I get current opened application name on screen http://stackoverflow.com/questions/11118721/android-how-can-i-get-current-opened-application-name-on-screen
Checking a checkbox in listview makes other random checkboxes checked too http://stackoverflow.com/questions/11190390/checking-a-checkbox-in-listview-makes-other-random-checkboxes-checked-too savedInstanceState PackageManager pm getPackageManager List ApplicationInfo packages pm.getInstalledApplications PackageManager.GET_META_DATA final CopyOfMyCustomAdapter a new CopyOfMyCustomAdapter this packages getListView .setAdapter a And finally the custom layout..
How to specify Activities that are only for phones or tablets on Android http://stackoverflow.com/questions/13202805/how-to-specify-activities-that-are-only-for-phones-or-tablets-on-android final ActivityInfo activity_info package_manager.getPackageInfo context.getPackageName PackageManager.GET_ACTIVITIES PackageManager.GET_META_DATA .activities for ActivityInfo info activity_info final String target_device info.metaData.getString target_device if target_device..
Intent to launch the clock application on android http://stackoverflow.com/questions/3590955/intent-to-launch-the-clock-application-on-android i 2 try ComponentName cn new ComponentName packageName className ActivityInfo aInfo packageManager.getActivityInfo cn PackageManager.GET_META_DATA alarmClockIntent.setComponent cn debug Found vendor packageName className foundClockImpl true catch NameNotFoundException..
Get active Application name in Android http://stackoverflow.com/questions/3861073/get-active-application-name-in-android
Determine list of permissions used by an installed application in Android http://stackoverflow.com/questions/4461504/determine-list-of-permissions-used-by-an-installed-application-in-android Map String String curChildMap new HashMap String String try PermissionInfo pinfo mPm.getPermissionInfo permission PackageManager.GET_META_DATA CharSequence label pinfo.loadLabel mPm CharSequence desc pinfo.loadDescription mPm catch NameNotFoundException e Log.i..
Android: How to reset FirstRun SharedPreferences when my app is updated? http://stackoverflow.com/questions/4726283/android-how-to-reset-firstrun-sharedpreferences-when-my-app-is-updated I use it in my main activity's onCreate PackageInfo pInfo try pInfo getPackageManager .getPackageInfo getPackageName PackageManager.GET_META_DATA if prefs.getLong lastRunVersionCode 0 pInfo.versionCode TODO Handle your first run situation here Editor editor prefs.edit..
AppWidget PendingIntent not working after Launcher restart http://stackoverflow.com/questions/4909886/appwidget-pendingintent-not-working-after-launcher-restart 2 try ComponentName cn new ComponentName packageName className ActivityInfo aInfo packageManager.getActivityInfo cn PackageManager.GET_META_DATA alarmClockIntent.setComponent cn foundClockImpl true catch NameNotFoundException e Log.d LOGTAG Error vendor does not..
How can I learn whether a particular package exists on my Android device? http://stackoverflow.com/questions/6758841/how-can-i-learn-whether-a-particular-package-exists-on-my-android-device
How do you add user defined properties/values in to the Android manifest file? http://stackoverflow.com/questions/7928105/how-do-you-add-user-defined-properties-values-in-to-the-android-manifest-file name foo meta data And read the data like so ai context.getPackageManager .getApplicationInfo context.getPackageName PackageManager.GET_META_DATA Object value Object ai.metaData.get foo See http developer.android.com guide topics manifest meta data element.html share..
How to get installed applications permissions http://stackoverflow.com/questions/7937794/how-to-get-installed-applications-permissions over the each permission PackageManager pm getPackageManager List ApplicationInfo packages pm.getInstalledApplications PackageManager.GET_META_DATA for ApplicationInfo applicationInfo packages Log.d test App applicationInfo.name Package applicationInfo.packageName try..
How to kill currently running task in android http://stackoverflow.com/questions/8814696/how-to-kill-currently-running-task-in-android d pack.getApplicationIcon packageName appName String pack.getApplicationLabel pack.getApplicationInfo packageName PackageManager.GET_META_DATA catch NameNotFoundException e e.printStackTrace packName.add packageName arraylist of package name apps.add appName..
Android: How to get a list of installed activities, as they appear in launcher, without duplicates http://stackoverflow.com/questions/9904698/android-how-to-get-a-list-of-installed-activities-as-they-appear-in-launcher installed applications 1 use PackageManager pm getPackageManager List ApplicationInfo apps pm.getInstalledApplication PackageManager.GET_META_DATA and from each element from apps you can get it's package name and package label app names . 2 use PackageManager pm getPackageManager..
|