title: How to create intent to choose image from gallery in Android 11?
body: <p>I can create intent to choose image from gallery on Android in Kotlin like this:</p>
  <pre><code>val intentGallery = Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI)
  if (intentGallery.resolveActivity(activity.packageManager) != null) {
      // Launch the intent
  }
  </code></pre>
  <p>What do I need to put in &quot;queries&quot; block in &quot;AndroidManifest&quot; file on Android 11 (API 30) for this code to work?</p>
  <p>Adding this code to &quot;queries&quot; block in &quot;AndroidManifest&quot; file, will make it work just fine.</p>
  <pre><code>&lt;package android:name=&quot;com.google.android.apps.photos&quot; /&gt;
  </code></pre>
  <p>But I want to add a code that covers all image galleries, not just Google's.</p>
  <p>Reference:
  <a href="https://developer.android.com/training/basics/intents/package-visibility" rel="noreferrer">https://developer.android.com/training/basics/intents/package-visibility</a></p>