Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After updating to cordova-android 9 can not select files from Google Drive #432

Closed
7 of 8 tasks
jsBiztech opened this issue Oct 21, 2020 · 7 comments
Closed
7 of 8 tasks

Comments

@jsBiztech
Copy link

jsBiztech commented Oct 21, 2020

Bug Report

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

Problem

Updating the version has started giving error for selecting files. All other places do work but for Google drive it returns error.

What is expected to happen?

File should be selected

What does actually happen?

File is not being selected unless its image.

Information

  • select file from recent
  • select file from downloads folder
  • select file from any other place
  • select image from Google drive
  • select video or any other file from Google drive

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

Command or Code

Android studio config:

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

Environment, Platform, Device

Android 10

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 (cordova-lib@9.0.1)
   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

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@HarelM
Copy link

HarelM commented Oct 30, 2020

Are you using legacy storage?
It might be that it's not possible anymore without this flag, also in 11 it will be even harder.
I'm able to select a file or a photo on a android 9 device, haven't tested it on 10 though...

@jsBiztech
Copy link
Author

Hello @HarelM ,
I have added following flag:

  • android:requestLegacyExternalStorage="true"

I am able to select files and images from Device storage but not from the google drive option.

Hope this helps.

@PieterVanPoyer
Copy link

Hey @nagdevbharat

A minimal reproduction repo would be a great way to get this started. https://github.com/apache/cordova-contribute/blob/master/create-reproduction.md

Kind regards

@jsBiztech
Copy link
Author

Hello @PieterVanPoyer ,

It will take time to create a repo.
If you can suggest any other troubleshooting options or workarounds?

Hope this helps.

@PieterVanPoyer
Copy link

Hey

I cannot do any suggestions, I am not really familiar with the file plugin.

Greetings

@alex-steinberg
Copy link

This is dealt with here: #426

@breautek breautek changed the title After updating to cordova-android 9 can not select files from drive After updating to cordova-android 9 can not select files from Google Drive May 2, 2021
@breautek
Copy link
Contributor

Scoped storage mechanisms prevents reading other apps files.

@breautek breautek closed this as not planned Won't fix, can't repro, duplicate, stale Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants