Android 11 (R) return empty list when querying intent for ACTION_IMAGE_CAPTURE

Android 11 changes how apps can query and interact with other apps. From the docs: The PackageManager methods that return results about other apps, such as queryIntentActivities(), are filtered based on the calling app’s <queries> declaration. So you need to declare <queries> in your AndroidManifest.xml: <manifest package=”com.example”> <queries> <intent> <action android:name=”android.media.action.IMAGE_CAPTURE” /> </intent> </queries> … … Read more

Allow user to select camera or gallery for image

How to launch a single Intent to select images from either the Gallery or the Camera, or any application registered to browse the filesystem. Rather than creating a Dialog with a list of Intent options, it is much better to use Intent.createChooser in order to get access to the graphical icons and short names of … Read more