Flutter Images and Video Saved using path_provider not showing in Gallery - flutter

I want to record a video or audio in my Flutter App and wants it to appear in gallery. How can I do it because path_provider is saving file to safe location and one need a rooted device to access it.
I was trying Flutter Camera Plugin Example
Also asked on https://github.com/flutter/flutter/issues/20807

The reason I was facing the problem is that the example I was trying uses path_provider function "getApplicationDocumentsDirectory()" to store the files.
By replacing above Function with "getExternalStorageDirectory()" I am able to store the file in the external directory and they appear in the Gallery.

You need to do scan media files using broadcast intent.
sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(YOUR_PATH)));

Related

Is there a way to store data in android folder with flutter?

Is there any way to store data(images, audio files, titles etc) in the project folder inside Android folder. And later access it later in case of no internet?? Right now I am displaying the images and playing audio mp3 directly from API response. Any help would be highly appreciated.

[Flutter]How to download video to app, and make it accessible only through the app (Similarly to Youtube/Netflix)

i'm fairly new to Flutter and is currently working on a course app that requires downloading the videos to the app.
The downloaded video will only be accessible through the app just like Youtube and Netflix, and will be hidden/encrypted from gallery. Would greatly appreciate if someone if someone could point me in the right direction in building this feature.
On iOS and Android your app has it's own isolated folder for storing documents. Items stored there are not intended to be accessible to the user outside of your app. This folder isn't scanned by the Gallery or accessible to other apps on the device. (However, with a little effort a user can access the files so this is not a complete solution where security is an concern. You would need to add encryption if you didn't, say, want a motivated user to copy the video file to a PC and be able to play it.)
the path_provider plugin gives your Flutter app common file locations on a device. The private app folder location is retrieved with getApplicationDocumentsDirectory()
"Download video" is a vague requirement. Most video on the internet (Netflix, Youtube) is provided via HLS or DASH for streaming, which you do download but the video is split up into many files- sometimes thousands of files for a single video. The dart:http package is likely what you're going to want to use to get/download the files (unless the video files aren't available via HTTP/HTTPS, then you'll need a different transport-specific library, like FTP, RTSP, etc.)

Flutter: How to display phone gallery on a container?

I found a way to display live camera on a container(). But I want to display gallery on Container() in app and control like photo example.
Is it possible in flutter ?
I'm not sure it would be possible to implement this but one things I have thought of is to request External Storage Access and maybe get the directory where all photo are stored and display the from File. However, this approach may need to a lot exceptions thrown.
I normal image_picker invokes the native channel to be able show the Android Native UI and same for iOS.

Can i change the volume of my AUDIO FILE without changing the SYSTEM volume in Flutter?

I am working on a flutter project where I want to play multiple sounds simultaneously and I want to change the volume for specific audio without changing the volume of other audios or the system volume.
I have tried various Flutter Libraries but couldn't work it out. Please help if anyone knows.
The application is similar to this application.
You can try audioplayers flutter plugin. The plugin can control the sound(volume parameter) and can play multiple files.
https://pub.dev/packages/audioplayers

Flutter - Upload Video to Youtube

In my app I need the ability to take and upload or save a short 5 to 15 second video. I also need to be able to save the video if the user is offline, and upload it when connected to internet.
I can create the video file with the plugin image_picker, I tried to save it to the users gallery using plugin image_picker_saver but that seems to only handle images.
So I will probably have to use something like path_provider to save it to local storage (again examples of writing files are images as byte data)
When connected is there a way to upload a video to a Youtube account ?
I have read up on some Youtube plugins, but they are geared towards playing videos.
I was thinking of using WebViews to pop up the m.youtube.com/upload page but once you start an upload it goes to the desktop www.youtube.com
Other option to consider is using Firestore as the upload destination when they have a connection, but I would still have to manage offline local storage.
Thank you any help
Edit RE: comments below
Here is what I get when trying to capture a Landscape video on iPhone X with camera plugin: