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

   > > 
   > 
   > @oudoken How to use both standard cordova-plugin-file and SAF Mediastore 
together. I mean how to make cordova-plugin-file work with SDK 24 to 28 and 
Mediastore work with SDK 29 and later, both in the same app?
   
   The native `Mediastore` API has been a concept since API 1, while specific 
features might require higher API levels, the general API should be usable 
across all API devices. MediaStore was always the recommended/preferred 
approach over direct filesystem access, it's just being enforced now since API 
29 (generally speaking).
   
   You could do version tests (should be able to get the API/android version 
from the `cordova-plugin-device`) and conditionally use the file plugin on API 
24-28, and SAF plugin on API 29+ but personally I'd simplify the logic and use 
SAF plugin across all android versions, not just for API 29+.


-- 
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.

To unsubscribe, e-mail: [email protected]

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