Native Gallery for Android & iOS

yasirkula

(202)
FREE
Publisher yasirkula
File size 79.61kB
Number of files 13
Latest version 1.8.0
Latest release date 2024-08-19 01:35:41
First release date 2018-03-14 12:15:24
Supported Unity versions 2018.4.2 or higher
Introductory price.. Not! It will always remain Free. Grab it whenever you want!

About
This plugin helps you interact with Gallery/Photos on Android & iOS.

Features
- Save your images/videos to the specified album in Gallery/Photos
- Prompt the user to pick an image or video from Gallery/Photos
- Prompt the user to pick multiple images or videos from Gallery/Photos (available on Android 18+ and iOS 14+)
- Prompt the user to pick images and videos simultaneously (available on Android 19+ and all iOS versions)
- Supports runtime permissions (for Android M+)

FAQ
- How can I fetch the path of the saved image or the original path of the picked image on iOS?
You can't. On iOS, these files are stored in an internal directory that we have no access to (I don't think there is even a way to fetch that internal path).

- Android build fails, it says "error: attribute android:requestLegacyExternalStorage not found" in Console
android:requestLegacyExternalStorage attribute in AndroidManifest.xml fixes a rare UnauthorizedAccessException on Android 10 but requires you to update your Android SDK to at least SDK 29. If this isn't possible for you, you should open NativeGallery.aar with WinRAR or 7-Zip and then remove the application tag from AndroidManifest.xml.

- Can't access the Gallery, it says "java.lang.ClassNotFoundException: com.yasirkula.unity.NativeGallery" in Logcat
If you are sure that your plugin is up-to-date, then enable "Custom Proguard File" option from Player Settings and add the following line to that file: -keep class com.yasirkula.unity.* { *; }

- Nothing happens when I try to access the Gallery on Android
Make sure that you've set the Write Permission to External (SDCard) in Player Settings.

- Saving image/video doesn't work properly
Make sure that the filename parameter of the Save function includes the file's extension, as well.

Older Versions
For older versions of Unity, you can download the plugin from GitHub. Supports at least Unity 5.6.

Forum Thread | GitHub Page | Documentation | Discord

Support the Developer ☕

Top Publisher Assets