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

Can't create file in Android 10+ #8

Open
bigshans opened this issue Mar 11, 2024 · 8 comments
Open

Can't create file in Android 10+ #8

bigshans opened this issue Mar 11, 2024 · 8 comments
Labels
Android bug Something isn't working

Comments

@bigshans
Copy link

Describe the bug
Pocket can't create files on Android 10.

Screenshots
图片

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: Android 13, Android 14

Additional context

  1. https://stackoverflow.com/a/68749082
  2. bug: Filesystem not finding file on android ionic-team/capacitor#2916
@Daniele-rolli
Copy link
Member

Thanks for pointing this out. I've looked into the issue and the additional context you provided, and I've updated the AndroidManifest.xml accordingly. The only issue we have is the following: The Google Play store has a policy that limits the usage of MANAGE_EXTERNAL_STORAGE, but we'll deal with Google later if need be.

@Daniele-rolli Daniele-rolli added the bug Something isn't working label Mar 11, 2024
@bigshans
Copy link
Author

Still has some problems for Android. I have ensured I built the debug application correctly but the application didn't request permission when it started.

@Daniele-rolli
Copy link
Member

Daniele-rolli commented Mar 11, 2024

So, let me get this straight: it does work now, but it doesn't ask for permission before accessing the device's filesystem, right?

@bigshans
Copy link
Author

So, let me get this straight: it does work now, but it doesn't ask for permission before accessing the device's filesystem, right

No, it doesn't work properly. I still get errors when the application tries to write files. And it doesn't request permission either. In settings, it says no permissions are required.

@Daniele-rolli
Copy link
Member

Uhm, I'll look into it, however it does work on android studio somehow.

@bigshans
Copy link
Author

Uhm, I'll look into it, however it does work on android studio somehow.

What's your Android version?

@Daniele-rolli
Copy link
Member

Here's the emulator's about section, as you can see it's running android 13 so it should be part of this issue. Anyway I believe I've found something in capacitor's documentation concerning permissions.

Screenshot_20240311_163325

@Daniele-rolli
Copy link
Member

I've browsed a bit and maybe the only quick fix is changing the way we store files. Since the app doesn't have access to the Documents folder anymore, we can change it to save the data under Data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android bug Something isn't working
Projects
Status: 🎉 Done
Development

No branches or pull requests

2 participants