Hello,
This package has been deprecated as it is legacy and is no longer maintained.
Please see Xam.Plugin.Media's nuget package.
If you want to pick or take a photo or video on the device. You can use MediaPicker in MAUI directly without install other packages.
==============Update================
But for backward compatibility, I want to create these folders to show the saved local data.
Ok, please find the AndroidManifest.xml, right-click it, choose Open with
, select the source Code(Text) Editor.
Find the <Application>
tag, add the <provider >
information in it.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:supportsRtl="true">
<!--add here-->
<provider android:name="androidx.core.content.FileProvider" android:authorities="${applicationId}.fileprovider" android:exported="false" android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths"></meta-data>
</provider>
</application>
<uses-permission android:name="android.permission.CAMERA" />
</manifest>
Then create a xml
folder in the Platforms/Android/Resources
, then create a xml file called file_paths.xml
and make sure the buildaction is Androidresource
Copy following content to the file_paths.xml.
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-files-path name="my_images" path="Pictures" />
<external-files-path name="my_movies" path="Movies" />
</paths>
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.