Swati4star / Images-to-PDF

An app to convert images to PDF file!
GNU General Public License v3.0
1.17k stars 790 forks source link

No permissions to enable on android #1156

Open zachgeller opened 5 months ago

zachgeller commented 5 months ago

Unable to select any files for conversion. No option to allow permissions other than camera. In settings there are no permissions available to select except camera, which doesn't help.

Steps to reproduce

Download app. Select allow permissions in pop-up. Select pdf convert, or convert pdf to image. Select image from file: "no permission to access this file"

Expected behaviour

Should be able to access my files

Actual behaviour

No ability to access my files, no option to allow correct permissions. Outdated support? Not up to date with latest Android versions?

Would you like to work on the issue?

Yes

poisonpen commented 4 months ago

I'm planning on working on this ! will open a pull request at some point

sls1005 commented 2 months ago

I encountered this bug recently (when trying to convert a PDF into image), but it then worked, and I can no longer reproduce this bug. When I was encountering the bug, I could still use the View Files option at the buttom of the screen to pick files by names and do the conversion.

As for the permission issue, this app does require the permissions to read and write the external storage. However, according to https://developer.android.com/training/data-storage, these permissions have lost their effects on recent versions of Android; a new permission named MANAGE_EXTERNAL_STORAGE is introduced instead, but it isn't something a normal app should have. If the app uses the Storage Access Framework to access files (which this app does, but possibly not in a right way), it doesn't need to declare any permission explicitly, and there is no permission to grant it in the Settings app; when you pick a file, you grant the permission implicitly. See my project for reference.

As for MANAGE_EXTERNAL_STORAGE, requesting it might solve the problem, but can also be something totally wrong.

poisonpen commented 2 months ago

I believe I tried implementing MANAGE_EXTERNAL_STORAGE. It's honestly been a while.

I'll go back and test the newest version of the app to see if I still get an error, because I did on my device every single time. If I do, I'll record it. It may have to do with the specific device one uses and if, like you mentioned, they have an older version of android. In which case, it might not be worth it to fix the issue?

Anyhow, I will look into it more and respond.

Thanks!

On Sat, Apr 20, 2024 at 12:22 AM sls1005 @.***> wrote:

I encountered this bug recently (when trying to convert a PDF into image), but it then worked, and I can no longer reproduce this bug. When I was encountering the bug, I could still use the View Files option at the buttom of the screen to pick files by names and do the conversion.

As for the permission issue, this app does require the permissions to read and write the external storage https://github.com/Swati4star/Images-to-PDF/blob/master/app/src/main/AndroidManifest.xml. However, according to https://developer.android.com/training/data-storage, these permissions have lost their effects on recent versions of Android; a new permission named MANAGE_EXTERNAL_STORAGE is introduced instead, but it isn't something a normal app should have. If the app uses the Storage Access Framework to access files (which this app does, but possibly not in a right way), it doesn't need to declare any permission explicitly, and there is no permission to grant it in the Settings app; when you pick a file, you grant the permission implicitly. See my project https://github.com/sls1005/FileSaver for reference.

As for MANAGE_EXTERNAL_STORAGE, requesting it might solve the problem, but can also be something totally wrong.

— Reply to this email directly, view it on GitHub https://github.com/Swati4star/Images-to-PDF/issues/1156#issuecomment-2067545407, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYYW23YHGHU762OXHOYW3NLY6HUORAVCNFSM6AAAAABC7LXSJ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRXGU2DKNBQG4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

emilebourban commented 1 month ago

Hi! I am experiencing the same issue on Android 13 (Fairphone 4), which makes the app unusable for me :( . I tried on latest version 9.0.1 and on 8.8.1 and both had this issue.