breautek commented on issue #426:
URL: 
https://github.com/apache/cordova-plugin-file/issues/426#issuecomment-716510123


   > Seems like the fix that was merge #417 in order to solve #408 will no 
longer work for android 11 (API level 30).
   
   Yes, you're correct. In API 29, there is a new file system policy. #417 
utilised an available flag to request the old file system system, but API 30 
will ignore that flag, forcing app developers to implement the new policy model.
   
   To learn about the new android model, you should probably read up on [Scoped 
Storage](https://developer.android.com/training/data-storage#scoped-storage). I 
briefly read up on this last weekend and it appears that some apps may require 
to migrate their data locations depending on where they store data. Scoped 
storage means just that, you're access to the filesystem is limited to a 
certain scope. Parts of the file system that you might have had access before 
may be impossible to access in API 30. **This means app developers should take 
this time to determine if they need to migrate data.** [Read the android 
notice](https://developer.android.com/about/versions/11/privacy/storage#migrate-data-for-scoped-storage)
 for more information on migration. Given the usual pattern, users have 
probably until August 2021 before Google force API 30 for new apps, and 
November 2021 before users are forced to use API 30 on existing apps.
   
   The new 
[MANAGE_EXTERNAL_STORAGE](https://developer.android.com/reference/android/Manifest.permission#MANAGE_EXTERNAL_STORAGE)
 permission I believe will essentially make the app behave pre API 29 without 
the legacy storage flag, but will likely be highly scrutinised by Google if the 
app uses it without a justified reason. This could be an opt in feature by 
documenting how one can add this permission using    
[config-file](https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#config-file)
 or 
[edit-config](https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#edit-config).
 The users must be targeting API 30 in order to use this permission, it isn't 
available in API 29.
   
   Lastly, getting familiar with the 
[MediaStore](https://developer.android.com/reference/android/provider/MediaStore)
 APIs sounds like is quite important, because apps can access some external 
filesystem storages, for accessing pictures, videos, and other media-related 
resources.
   
   What needs to be changed exactly in the Apache codebase I'm not so certain 
myself, I'm not that familiar with the code base.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to