Skip to content

Cant get access to media file #289

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

Closed
3 tasks done
hung91 opened this issue Nov 10, 2023 · 3 comments · Fixed by #308
Closed
3 tasks done

Cant get access to media file #289

hung91 opened this issue Nov 10, 2023 · 3 comments · Fixed by #308
Labels
Milestone

Comments

@hung91
Copy link

hung91 commented Nov 10, 2023

Bug Report

Sry for open a new Bug Report. Maybe there is already one for this topic.
On some device like the Xiaomi or google pixel you cant access to the media file, in this case i try to record audio and getting that file.
For example on the Xiaomi this is the fullPath i get file:///storage/emulated/0/Android/data/com.android.soundrecorder/files/xxx.acc

Problem

What is expected to happen?

Get fileEntry

What does actually happen?

Error code 1

Information

Using latest cordova-plugin-file and cordova plugin-media-capture

Command or Code

window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fs) {
fs.root.getFile("Android/data/com.android.soundrecorder/files/xxx.acc"),

});
Throws error code 1

Environment, Platform, Device

android 12.0.0

Version information

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@hung91
Copy link
Author

hung91 commented Nov 10, 2023

On a Pixel 6a Android 13:
{"code":0,"message":"Error: no mediaFile created from content://com.google.android.apps.recorder.fileprovider/recording/xxx.m4a"}

On Samsung devices (atleast my devices) it does work

@hung91 hung91 changed the title Cant get media file Cant get access to media file Nov 15, 2023
@JLoveI
Copy link

JLoveI commented Jan 2, 2024

Same Issue in xiaomi Android 14
{code: 0, message: 'Error: no mediaFile created from content://com.and…%A5%20%E4%B8%8B%E5%8D%883%E7%82%B952%E5%88%86.m4a'}

@mobiliseapplabllp

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants