Comments (12)
Here's what I think I can do -- I'll implement #74, so that way you have a getAlbumsPath()
function that tells you where your app's albums are. That way, instead of just checking albums by name, you can also make sure the album identifier starts with the albums path (i.e. it's an album stored in the writeable albums path). If there isn't one there (e.g. they updated their phone and now they have a different albums path because of android version), you'll know to re-create the album.
from media.
Hey @nkalupahana, I tested the example app and didn't have the issue. I found the issue. What i was doing: I search for my YOOBIC album in the getAlbums, to get the identifier. If i don't find it, I create a new YOOBIC album. The path of my YOOBIC album was this one : "/storage/emulated/0/Pictures/YOOBIC" ➝ As i don't have access to pictures with the new API we're targeting (33), i'm getting a permission denial for wanting to save my picture inside this YOOBIC folder. Deleting my folder and re-creating it from the createAlbum function worked fine on android 10 & 13. Now my album is inside Android/media. Do you think it's possible to add on your side a property on the album objects to know if we can write inside those folders or no ? for now we just found a workaround to rename this folder to a new name to use the createAlbum for everyone.
I'm curious, did you ask your users to rename the folder themselves? And even if you rename the folder, half of the medias are stored in this old folder and the rest will be stored in the new one. Or maybe did you find a workaround to merge / transfer the albums?
Hey @amakh , we're waiting for the gelAlbumsPath() to have access to the folders where we can actually write into. At the same time we just renamed the name of the album where we will store our medias, so that it will create a new album for all the users of the app in a storage folder where we can write into.
Ok I see, thank you. Some of our users were asking why they couldn't find medias in the old album (they didn't check other paths or they were pointing the initial folder to be sync by other tools).
I guess we will just continue to answer to them telling to use the new album now.
from media.
I have the same problem. I need help please.
from media.
Should be fixed on 5.3.1, please confirm.
from media.
Hey @nkalupahana , thank you for helping on this issue 🙏
I tested latest version on my android 10, and i still have the issue RuntimeException occurred, and now the photo is not downloaded anymore.
Here is the issue i have on the plugin side :
When storage permission was required, i accepted it, but i still have this permission denial after that. I'm trying to save my picture on an existing 'YOOBIC' folder.
Issue is not reproducible on android 13.
from media.
@nkalupahana This is my code:
let params;
if(this.platform.is('ios')){
params = {
path: fileUrl
};
}else{
let album = await this.getAlbumIdentifier();
console.log(album);
if (!album.success){
this.tools.showToast('No se ha encontrado ningún album en el dispositivo.');
return;
}
params = {
path: fileUrl,
albumIdentifier: album.identifier
};
}
Media.saveVideo(params).then((res) => {
this.tools.showToast('Vídeo descargado.');
}).catch((err) => {
console.error(err);
this.tools.showToast('Ha ocurrido un error al descargar el vídeo.');
}).finally(() => {
loader.dismiss();
});
but I have this error:
@mfschieber is the same problem
from media.
Can you both try the example app in the example
folder? This is what I use to debug issues, and it currently works for me on the Android 10 emulator. This will help me narrow down the issue.
If it is still broken on the example app, let me know what order you need to press buttons on the example app to reproduce the crash.
from media.
Hey @nkalupahana, I tested the example app and didn't have the issue. I found the issue. What i was doing: I search for my YOOBIC album in the getAlbums, to get the identifier. If i don't find it, I create a new YOOBIC album. The path of my YOOBIC album was this one : "/storage/emulated/0/Pictures/YOOBIC" ➝ As i don't have access to pictures with the new API we're targeting (33), i'm getting a permission denial for wanting to save my picture inside this YOOBIC folder.
Deleting my folder and re-creating it from the createAlbum function worked fine on android 10 & 13. Now my album is inside Android/media.
Do you think it's possible to add on your side a property on the album objects to know if we can write inside those folders or no ? for now we just found a workaround to rename this folder to a new name to use the createAlbum for everyone.
from media.
thanks @nkalupahana , would be nice ! i'm suscribing to this feature to test that when it's ready 👍
from media.
Hey @nkalupahana, I tested the example app and didn't have the issue. I found the issue. What i was doing: I search for my YOOBIC album in the getAlbums, to get the identifier. If i don't find it, I create a new YOOBIC album. The path of my YOOBIC album was this one : "/storage/emulated/0/Pictures/YOOBIC" ➝ As i don't have access to pictures with the new API we're targeting (33), i'm getting a permission denial for wanting to save my picture inside this YOOBIC folder. Deleting my folder and re-creating it from the createAlbum function worked fine on android 10 & 13. Now my album is inside Android/media. Do you think it's possible to add on your side a property on the album objects to know if we can write inside those folders or no ? for now we just found a workaround to rename this folder to a new name to use the createAlbum for everyone.
I'm curious, did you ask your users to rename the folder themselves? And even if you rename the folder, half of the medias are stored in this old folder and the rest will be stored in the new one. Or maybe did you find a workaround to merge / transfer the albums?
from media.
Hey @nkalupahana, I tested the example app and didn't have the issue. I found the issue. What i was doing: I search for my YOOBIC album in the getAlbums, to get the identifier. If i don't find it, I create a new YOOBIC album. The path of my YOOBIC album was this one : "/storage/emulated/0/Pictures/YOOBIC" ➝ As i don't have access to pictures with the new API we're targeting (33), i'm getting a permission denial for wanting to save my picture inside this YOOBIC folder. Deleting my folder and re-creating it from the createAlbum function worked fine on android 10 & 13. Now my album is inside Android/media. Do you think it's possible to add on your side a property on the album objects to know if we can write inside those folders or no ? for now we just found a workaround to rename this folder to a new name to use the createAlbum for everyone.
I'm curious, did you ask your users to rename the folder themselves? And even if you rename the folder, half of the medias are stored in this old folder and the rest will be stored in the new one. Or maybe did you find a workaround to merge / transfer the albums?
Hey @amakh , we're waiting for the gelAlbumsPath() to have access to the folders where we can actually write into. At the same time we just renamed the name of the album where we will store our medias, so that it will create a new album for all the users of the app in a storage folder where we can write into.
from media.
getAlbumsPath()
has been added in 5.4.0, and the example code has been updated to use it. If you need any help with this, please open a new issue!
from media.
Related Issues (20)
- 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
- 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
- feat: Capacitor 6 Support HOT 4
- Failed to parse source map HOT 1
- Capacitor 5 - iOS savePhoto from public/images file HOT 2
- Photo Gallery Sync HOT 1
- Cache function HOT 3
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.