Wasim
Wasim

Reputation: 109

Ionic 3: After updating to cordova-android 9 can not select files from drive

I have recently update the ionic 3 app to support cordova-android to 9 and also updated the File plugin (cordova-plugin-file) and I am not able to select file or video from Google Drive.

Updating the version has started giving error for selecting files. All other places do work but for Google drive, it returns an error unless the selected file is an image.

Here is error logs:

3943-3975/? E/oiface: DynamicFps is not enabled!
1872-4430/? E/TaskPersister: File error accessing recents directory (directory doesn't exist?).

Version information

    Ionic:
   Ionic CLI          : 5.2.4
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.4

Cordova:
   Cordova CLI       : 9.0.0 ([email protected])
   Cordova Platforms : android 9.0.0, ios 5.1.1
   Cordova Plugins   : cordova-plugin-file 6.0.2, cordova-plugin-file-opener2 2.0.19, cordova-plugin-file-transfer 1.7.1, cordova-plugin-filechooser 1.2.0, cordova-plugin-filepath 1.5.8, cordova-plugin-filepicker 1.1.6,

Utility:
   cordova-res : 0.15.1 
   native-run  : not installed

System:
   Android SDK Tools : 26.1.1
   ios-sim           : 7.0.0
   NodeJS            : v10.16.2
   npm               : 6.9.0
   OS                : macOS Catalina
   Xcode             : Xcode 10.2 Build version 10E125

Android studio config:

minSDKVersion: 19
targetSDKVersion: 29
android:requestLegacyExternalStorage="true"
<preference name="AndroidPersistentFileLocation" value="Compatibility" />

Can anyone please help with this?

Upvotes: 0

Views: 836

Answers (1)

vss
vss

Reputation: 1153

You should also mention compile settings android:compileSdkVersion="29" along with targetSDKVersion and minSDKVersion as Android 10 has updated the storage access settings.

Upvotes: 0

Related Questions