-
Notifications
You must be signed in to change notification settings - Fork 497
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
Add the ability to specify where the capture should be saved #210
Comments
Hi @ataylor32 , you are right. Since the storage update on Android 11, the app will not be able to access the media file that is saved into external storage by the plugin (using native camera app). The idea for this is to use a ContentProvider (a FileProvider, in this case) as a common database to save files, so that both our app and other apps can get access to. I already implemented this for the |
Thank you @chriskhongqarma I'm looking forward in seeing that PR. I wonder if it's something easily replicatable to the file plugin and the camera plugin? |
@breautek You are right, the camera plugin is also using FileProvider, so it is a very good reference. |
when recording a video with
on Android < 11, I get the file path in the callback like so: on Android 11, I get: I am using the flag Am I missing something? Any suggestions? |
Cordova does not support API 30 yet.
This flag only works on API 29, it's ignored on API >= 30. Therefore for the time being, It's recommended that you use this flag while targeting API 29 and the filesystem should work provided that the user has granted you the permission to read external files. |
@breautek I am not targeting api 30 yet
|
@breautek all good, apparently it is an issue with custom ROMs only. |
Source code for video capture fallbacks to this stange(?) path to It was introduced years ago in #13 ... but really no idea why such a file would be written in this directory 🤔 (no EXTRA_OUTPUT or so defined) ... if ever it is useful, a check with |
see apache#210, and follow doc https://developer.android.com/training/camera/videobasics#TaskVideoView (removes partial changes done in apache#13 for old android and cordova versions)
see apache#210, and follow doc https://developer.android.com/training/camera/videobasics#TaskVideoView (removes partial changes done in apache#13 for old android and cordova versions)
…File (#232) * fix(android): standard way to get video uri from intent see #210, and follow doc https://developer.android.com/training/camera/videobasics#TaskVideoView (removes partial changes done in #13 for old android and cordova versions) * style(android): cleanup imports and remove unused method * fix(android): prevent NPE with null checks on intent data and mediaFile
Feature Request
Motivation Behind Feature
For some apps, it is undesirable to have captured media visible in the user's standard photo/video viewing app (or any other app, for that matter). In these cases, the app's captured media should be isolated to the app (i.e. the captured media should be stored somewhere that's not visible to other apps).
Some developers have tried getting around this by moving the captured media, but have run into a problem (see issue #133).
In addition, some developers are having trouble accessing captured media (see issues #103 #135 #196).
If I'm understanding correctly, this change would also be important for Android 11 (see Google's "Storage updates in Android 11" article).
Feature Description
CaptureAudioOptions
,CaptureImageOptions
, andCaptureVideoOptions
could all have a new property for specifying where the capture should be saved.Alternatives or Workarounds
I don't know of any reliable alternatives or workarounds.
The text was updated successfully, but these errors were encountered: