android Programming Glossary: packagemanager.match_default_only
How can I get the package name of the current launcher in android 2.3 and above? http://stackoverflow.com/questions/10344824/how-can-i-get-the-package-name-of-the-current-launcher-in-android-2-3-and-above resolveInfo getPackageManager .resolveActivity intent PackageManager.MATCH_DEFAULT_ONLY String currentHomePackage resolveInfo.activityInfo.packageName..
Calling camera from an activity, capturing an image and uploading to a server http://stackoverflow.com/questions/10679571/calling-camera-from-an-activity-capturing-an-image-and-uploading-to-a-server list packageManager.queryIntentActivities intent PackageManager.MATCH_DEFAULT_ONLY return list.size 0 The problem is when I capture the image..
Android intent for playing video? http://stackoverflow.com/questions/1572107/android-intent-for-playing-video list getPackageManager .queryIntentActivities intent PackageManager.MATCH_DEFAULT_ONLY return list.size 0 In use when I would usually just start the..
How do I determine if Android can handle PDF http://stackoverflow.com/questions/2784847/how-do-i-determine-if-android-can-handle-pdf List list packageManager.queryIntentActivities testIntent PackageManager.MATCH_DEFAULT_ONLY if list.size 0 file.isFile Intent intent new Intent intent.setAction.. if packageManager.queryIntentActivities testIntent PackageManager.MATCH_DEFAULT_ONLY .size 0 return true else return false share improve this answer..
android: how do i open another app from my app? http://stackoverflow.com/questions/2923265/android-how-do-i-open-another-app-from-my-app pdf List list packageManager.queryIntentActivities intent PackageManager.MATCH_DEFAULT_ONLY if list.size 0 intent.setDataAndType path application pdf startActivity..
Download a file with Android, and showing the progress in a ProgressDialog http://stackoverflow.com/questions/3028306/download-a-file-with-android-and-showing-the-progress-in-a-progressdialog context.getPackageManager .queryIntentActivities intent PackageManager.MATCH_DEFAULT_ONLY return list.size 0 catch Exception e return false Method's..
Show PDF in Android http://stackoverflow.com/questions/3706370/show-pdf-in-android intents getPackageManager .queryIntentActivities intent PackageManager.MATCH_DEFAULT_ONLY if intents null intents.size 0 display message then... finish..
Download app if intent not installed http://stackoverflow.com/questions/4240077/download-app-if-intent-not-installed List list packageManager.queryIntentActivities intent PackageManager.MATCH_DEFAULT_ONLY final boolean isAvailable list.size 0 To open Google Market..
How to check if Flash is installed? http://stackoverflow.com/questions/4458930/how-to-check-if-flash-is-installed list packageManager.queryIntentActivities intent PackageManager.MATCH_DEFAULT_ONLY return list.size 0 public static boolean isScanAvailable Context..
View MS office files in an android application http://stackoverflow.com/questions/4775295/view-ms-office-files-in-an-android-application list packageManager.queryIntentActivities intent PackageManager.MATCH_DEFAULT_ONLY return list.size 0 java android file ms office android intent..
Reliably detect PDF support on Android device http://stackoverflow.com/questions/4901104/reliably-detect-pdf-support-on-android-device pdf if packageManager.queryIntentActivities testIntent PackageManager.MATCH_DEFAULT_ONLY .size 0 return true else return false And that has been working..
Launching default android launcher programmatically http://stackoverflow.com/questions/6705847/launching-default-android-launcher-programmatically Intent.ACTION_MAIN .addCategory Intent.CATEGORY_HOME PackageManager.MATCH_DEFAULT_ONLY if getPackageName .equals resolveInfo.activityInfo.packageName..
how to download adobe reader programatically if not exists http://stackoverflow.com/questions/9480045/how-to-download-adobe-reader-programatically-if-not-exists List list packageManager.queryIntentActivities testIntent PackageManager.MATCH_DEFAULT_ONLY if list.size 0 file.isFile Intent intent new Intent intent.setAction..
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 Maps and other preinstalled apps. I've tried using PackageManager.MATCH_DEFAULT_ONLY flag when executing queryIntentActivities but this also filters..
How can I get the package name of the current launcher in android 2.3 and above? http://stackoverflow.com/questions/10344824/how-can-i-get-the-package-name-of-the-current-launcher-in-android-2-3-and-above
Calling camera from an activity, capturing an image and uploading to a server http://stackoverflow.com/questions/10679571/calling-camera-from-an-activity-capturing-an-image-and-uploading-to-a-server final Intent intent new Intent action List ResolveInfo list packageManager.queryIntentActivities intent PackageManager.MATCH_DEFAULT_ONLY return list.size 0 The problem is when I capture the image it asks for save or discard. When I click on save my app crashes..
Android intent for playing video? http://stackoverflow.com/questions/1572107/android-intent-for-playing-video private boolean isCallable Intent intent List ResolveInfo list getPackageManager .queryIntentActivities intent PackageManager.MATCH_DEFAULT_ONLY return list.size 0 In use when I would usually just start the activity final Intent intent new Intent com.android.camera.action.CROP..
How do I determine if Android can handle PDF http://stackoverflow.com/questions/2784847/how-do-i-determine-if-android-can-handle-pdf Intent Intent.ACTION_VIEW testIntent.setType application pdf List list packageManager.queryIntentActivities testIntent PackageManager.MATCH_DEFAULT_ONLY if list.size 0 file.isFile Intent intent new Intent intent.setAction Intent.ACTION_VIEW Uri uri Uri.fromFile file intent.setDataAndType..
android: how do i open another app from my app? http://stackoverflow.com/questions/2923265/android-how-do-i-open-another-app-from-my-app new Intent Intent.ACTION_VIEW intent.setType application pdf List list packageManager.queryIntentActivities intent PackageManager.MATCH_DEFAULT_ONLY if list.size 0 intent.setDataAndType path application pdf startActivity intent How to pass parameters to an application..
Download a file with Android, and showing the progress in a ProgressDialog http://stackoverflow.com/questions/3028306/download-a-file-with-android-and-showing-the-progress-in-a-progressdialog List ResolveInfo list context.getPackageManager .queryIntentActivities intent PackageManager.MATCH_DEFAULT_ONLY return list.size 0 catch Exception e return false Method's name explains it all. Once you are sure DownloadManager is available..
Show PDF in Android http://stackoverflow.com/questions/3706370/show-pdf-in-android intent.setType application pdf List ResolveInfo intents getPackageManager .queryIntentActivities intent PackageManager.MATCH_DEFAULT_ONLY if intents null intents.size 0 display message then... finish On my HTC Desire this doesn't return a match even though I..
Download app if intent not installed http://stackoverflow.com/questions/4240077/download-app-if-intent-not-installed getPackageManager final Intent intent new Intent intentToCheck List list packageManager.queryIntentActivities intent PackageManager.MATCH_DEFAULT_ONLY final boolean isAvailable list.size 0 To open Google Market via Intent Intent marketIntent new Intent Intent.ACTION_VIEW..
How to check if Flash is installed? http://stackoverflow.com/questions/4458930/how-to-check-if-flash-is-installed final Intent intent new Intent action List ResolveInfo list packageManager.queryIntentActivities intent PackageManager.MATCH_DEFAULT_ONLY return list.size 0 public static boolean isScanAvailable Context context return isIntentAvailable context com.google.zxing.client.android.SCAN..
View MS office files in an android application http://stackoverflow.com/questions/4775295/view-ms-office-files-in-an-android-application Intent.ACTION_VIEW intent.setType application doc List ResolveInfo list packageManager.queryIntentActivities intent PackageManager.MATCH_DEFAULT_ONLY return list.size 0 java android file ms office android intent share improve this question You can try. Create an ACTION_VIEW..
Reliably detect PDF support on Android device http://stackoverflow.com/questions/4901104/reliably-detect-pdf-support-on-android-device new Intent Intent.ACTION_VIEW testIntent.setType application pdf if packageManager.queryIntentActivities testIntent PackageManager.MATCH_DEFAULT_ONLY .size 0 return true else return false And that has been working great so far. I know that at least the HTC default viewer..
Launching default android launcher programmatically http://stackoverflow.com/questions/6705847/launching-default-android-launcher-programmatically resolveInfo packageManager.queryIntentActivities new Intent Intent.ACTION_MAIN .addCategory Intent.CATEGORY_HOME PackageManager.MATCH_DEFAULT_ONLY if getPackageName .equals resolveInfo.activityInfo.packageName if this activity is not in our activity in other words it's..
how to download adobe reader programatically if not exists http://stackoverflow.com/questions/9480045/how-to-download-adobe-reader-programatically-if-not-exists Intent Intent.ACTION_VIEW testIntent.setType application pdf List list packageManager.queryIntentActivities testIntent PackageManager.MATCH_DEFAULT_ONLY if list.size 0 file.isFile Intent intent new Intent intent.setAction Intent.ACTION_VIEW Uri uri Uri.fromFile file intent.setDataAndType..
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 but this removes many apps that i want to have including Maps and other preinstalled apps. I've tried using PackageManager.MATCH_DEFAULT_ONLY flag when executing queryIntentActivities but this also filters out many apps leaving just a few. I'm kinda lost here and..
|