Comments (10)
Got it, okay. getAlbums returning all albums is expected behavior. I think the best course of action, then, is to check for your bundle ID in getAlbums calls on Android when filtering.
from media.
Looks like the common thread between the devices is that they're on Android 13. Do you have the following in your manifest?
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
from media.
The 'getAlbums()' method seems to retrieve all albums, not just those within the application specific path, but also from other paths that require MANAGE_EXTERNAL_STORAGE permission to access.
Certain Android users with a version above 10 are encountering crashes, presumably because there are albums with identical names located outside of the designated path for the app. (storage/emulated/.../com.schoolbell_e.schoolbell_e/...)
from media.
Hi, I'm also running into same issue. Any ETA when it will be fixed?
from media.
Hi, I'm also running into same issue. Any ETA when it will be fixed?
I may need to do some more tracking, but it seems that checking the bundle ID on Android 10 and above versions could resolve the issue.
from media.
Android users with a version under 9 don't need bundle ID, but still get the permission error when they use any album in the external storage of SD card. (https://developer.android.com/about/versions/11/privacy/storage)
[Android 9 Test]
getAlbums: Internal(O) External(O)
copyFile: Internal(O) External(X)
[Error]
Copy file not found: /storage/6439-3263/Gallery/학교종이/IMG_20230912_152806379.jpg, error: /storage/6439-3263/Gallery/학교종이/IMG_20230912_152806379.jpg (Permission denied)
from media.
@fireonmac are you saying this issue shows up for all albums, including ones you created using the app, or just when album names conflict? I'm confused about the status of this issue right now.
from media.
@nkalupahana I think the problem is the album name conflict. Is it intentional that user can't save image to albums in external storage? The problem I encountered was some of my users copied the folder by using file explorer and paste it in SD card, so those are recognized when getAlbums() called though it's in external, but users can't copy files from there due to the lack of permission to access.
from media.
Maybe you need to specify a different permission in your manifest? Not sure what that would be though.
If the problem is an album name conflict, I would also recommend using a different album name that's less likely to conflict, or using some URL parser to determine what storage volume the album is on.
I've also been considering adding a getAlbumPath()
function or similar, that would return the path that the plugin stores its albums at. Then, you could just use that to compare the path. If that would be useful, please let me know.
from media.
@fireonmac let me know if this would be useful, or if you need any help! Otherwise, I'll close this issue.
from media.
Related Issues (20)
- 199131008-c2327514-8987-4535-b377-41dbed6a8e52.png (1302×540)https://github.com/orgs/community/discussions/35791
- Type in your language with Gboard
- Media.savePhoto's Promise<PhotoResponse> returns 'undefined' on iOS HOT 2
- Read file path from platform-specific identifier on iOS HOT 1
- docs(android): make it clear that file return on savePhoto is only available on Android
- App crash after downloading an image HOT 8
- App is crashed on Android due to EACCES (Permission denied) HOT 11
- Is there any method to retrieve more photos like using offset in query? HOT 1
- feat(android): add getAlbumsPath() function to get where albums are stored on filesystem
- Error: RuntimeException occurred : In SaveVideo method HOT 1
- READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE are still required in Android 13 HOT 5
- RuntimeException occurred / EACCES (Permission denied) when trying to save a photo/gif/video on android < 13 HOT 12
- When wanting to save photo to Album with identifier, getting identifier doesnt exist even tho Album exist HOT 3
- feat(ios): support jpeg files instead of png HOT 3
- Camera plugin is not implement on Android (Capacitor Camera) when pairing with Capacitor-Community/Media HOT 2
- savePhoto is not working in android 8.1.0 Samsung SM-T580 tablet HOT 1
- MediaFetchOptions support individual photo for high resolution HOT 2
- feat(ios): get specific media by identifier HOT 9
- feat: has access right / error codes for all errors HOT 5
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 media.