Comments (11)
Haha okay thanks for the fix! I didn't know where else I should look to help out.
And I have to agree that the SD card write permission is quite annoying ;)
from simple-gallery.
See the crash log gist here. The path is something like /storage/sdcard1/photos/somefile.gif
so I don't understand how that is an "Invalid URI".
Edit: Appending file://
when calling Utils.Companion.getFileDocument
doesn't avoid the error either.
Edit2: Config.newInstance(this).getTreeUri()
returns ""
(empty string). Is this meant to happen?
from simple-gallery.
Hey, thanks for the report and the gist! It should be fixed with the next version 1.30. The invalid URI is not the one of your file, its related to that ridiculously stupid Android 5+ new SD card write permission.
from simple-gallery.
Not so fast @tibbi, for some reason it still doesn't ask me for SD card permission and fails in the same place (trying with your latest commit).
I even cleared app data, uninstalled, and restarted phone (Android does weird stuff with the write permissions after rebooting; I've also had some issues with this and OpenCamera, where I need to re-ask manually after rebooting).
Also tried renaming the folder. You guessed it, same result, it also crashes, and never asks for permission. But not asking for permission should perhaps be a different issue.
from simple-gallery.
maybe the SD card path is not detected properly. Can you please check at the beginning of deleteItem(File file), which of the conditions is not true? One of these:
!file.canWrite()
Config.newInstance(activity).treeUri.isEmpty()
from simple-gallery.
Yes, I was exactly checking those three from isShowingWritePermissions
, but I don't know how the heck I log something on the console in Kotlin! Hold on.
from simple-gallery.
file.canWrite()
returns true
, so it does not enter the condition. Maybe you should use ||
instead &&
(at least for the canWrite
and treeUri.isEmpty()
part, which is the one missing)?
Edit: Yes, the condition as return if (needsStupidWritePermissions(activity, file.absolutePath) && !file.canWrite() || Config.newInstance(activity).treeUri.isEmpty())
seems to work (althought it opened many, many pop-ups asking for selecting the SD card!).
from simple-gallery.
I think the reason for it to show so many pops up is that, after I click "OK, I'll select the SD card" the dialog closes, and thus it opens another one (because it's still trying to delete more files I assume).
from simple-gallery.
okay cool, thanks a lot. I dont feel like messing around with it even more, should be good enough.
from simple-gallery.
Everything working @tibbi. When renaming it only shows the pop up once if you click outside (to cancel), but when deleting the whole folder, a second dialog pops up (with one element in the folder). Still, the problem is fixed and this only happens once!
from simple-gallery.
ok thanks :) Thats good enough, I dont want to spend more time with it.
from simple-gallery.
Related Issues (20)
- device boot "Error: java.lang.IllegalArgumentException: Volume external_primary not found" HOT 1
- Sliding through the gallery HOT 2
- Thank you!
- Problema app contatti messaggi telefono HOT 4
- [Feature request] Add image rotation function HOT 2
- Support AVIF image file HOT 2
- FDroid Listing Missing HOT 4
- Wildcard search HOT 1
- Show groupled subfolders in search results and main screen when pinned HOT 2
- Support for ts video files HOT 1
- Reading Old Cache Image Everytime in Loading Image via Cross App HOT 2
- Only in Copy/Move Dialog: Search Term Cannot Be Entered With External Keyboard HOT 2
- some previews / thumbnails aren't rendering HOT 2
- [Feature Request] Make gifs HOT 3
- [Feature Request] Use CLIP for in Image search. HOT 2
- Random slideshow bugs HOT 4
- Gestures for switching between apps don't work when simple-gallery is in foreground HOT 2
- New Folder Not Found in Search Within Simple Gallery App HOT 1
- Language Change Not Possible for API 27 but possible for API 34 in Simple Gallery App HOT 1
- Folder View Replacement Error When Creating Empty Folder HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simple-gallery.