title: Alternative for MediaScanner scanFile / CameraRoll on Android 29/Q
body: <p>Google Play Store set new requirements regading Android Scoped Storage regarding apps using the manifest flag <code>requestLegacyExternalStorage</code>.<br />
  My app is using <a href="https://github.com/react-native-cameraroll/react-native-cameraroll/" rel="nofollow noreferrer">CameraRoll package from React Native community</a> which does not yet support the scoped storage (and require the <code>requestLegacyExternalStorage</code> flag to work) and the timeline is very short (<strong>May 5th 2021</strong>). Is there any alternative for CameraRoll?
  The goal here is to show the image in the user Gallery apps, like Google photos or vendor default Gallery without extra actions on the user side.</p>
  <p>Original Google Play message:</p>
  <p><div class="snippet" data-lang="js" data-hide="true" data-console="false" data-babel="false">
  <div class="snippet-code snippet-currently-hidden">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    Starting May 5th, you must let us know why your app requires broad storage access APPNAME 14 avr. 2021 19:26
  
      We've detected that your app contains the requestLegacyExternalStorage flag in the manifest file of 1 or more of your app bundles or APKs.
  
      Developers with apps on devices running Android 11+ must use Scoped Storage to give users better access control over their device storage. To release your app on Android 11 or newer after May 5th, you must either:
  
      Update your app to use more privacy friendly best practices, such as the Storage Access Framework or Media Store API
      Update your app to declare the All files access (MANAGE_EXTERNAL_STORAGE) permission in the manifest file, and complete the All files access permission declaration in Play Console from May 5th
      Remove the All files access permission from your app entirely
  
      For apps targeting Android 11, the requestLegacyExternalStorage flag will be ignored. You must use the All files access permission to retain broad access.
  
      Apps requesting access to the All files access permission without a permitted use will be removed from Google Play, and you won't be able to publish updates.</code></pre>
  </div>
  </div>
  </p>