title: Android Camera intent not responding in Android 11
body: <p>I am working with Camera Intent. Everything is working fine till Android 10, but in Android 11 I am getting result Code 0.</p>
  <ol>
  <li><p>Manifest Permission</p>
  <pre><code>&lt;uses-permission android:name=&quot;android.permission.CAMERA&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.READ_EXTERNAL_STORAGE&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot; /&gt;
  </code></pre>
  </li>
  <li><p>Intent function with file creation :</p>
  <pre><code> private void openCameraApp()
   {
       Intent picIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE).
               addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
       try {
  
           String file_path = Environment.getExternalStorageDirectory().toString() +
                   &quot;/&quot; + mContext.getResources().getString(R.string.app_name);
  
           File dir = new File(file_path);
           if (!dir.exists())
               dir.mkdirs();
  
           imagePath = new File(dir, mContext.getResources().getString(R.string.app_name) + System.currentTimeMillis() + &quot;.png&quot;);
  
           if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.N) {
               picIntent.putExtra(MediaStore.EXTRA_OUTPUT, FileProvider.getUriForFile(mContext, BuildConfig.APPLICATION_ID, imagePath));
               setUri(FileProvider.getUriForFile(mContext, BuildConfig.APPLICATION_ID, imagePath));
           } else {
               picIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imagePath));
               setUri(Uri.fromFile(imagePath));
           }
  
           ((Activity) mContext).startActivityForResult(picIntent, CAMERA_REQUEST);
  
       } catch (Exception e) {
           logger.e(e);
       }
   }
  </code></pre>
  </li>
  </ol>
  <p>I have added <code>android:requestLegacyExternalStorage=&quot;true&quot;</code> in application tag of manifest file.</p>