Native Share for Android & iOS
yasirkula
$0.0
Date |
Price |
---|---|
日期和时间 |
价钱($) |
03/25(2018) |
0.0 |
11/17(2024) |
0.0 |
Jump AssetStore
Introductory price.. Not! It will always remain Free. Grab it whenever you want!
About
This plugin helps you natively share files (images, videos, documents, etc.) and/or plain text on Android & iOS.
Features
- Supports sharing multiple files
- Supports adding subject and/or text
- Supports share callback
- Compatible with latest versions of Android (uses a ContentProvider)
Please note that some apps may ignore the text and/or subject of the shared content. For example, Facebook omits text, if provided. The only way to add text to the shared content is by using the Facebook SDK, which this plugin doesn't use.
FAQ
- I can't share image with text on X app
It is just not possible to share an image/file with text/subject on some apps (e.g. Facebook), they intentionally omit either the image or the text from the shared content. These apps require you to use their own SDKs for complex share actions. For best compatibility, I'd recommend you to share either only image or only text.
- Can I share on a specific app?
On Android, you can share on a specific app via AddTarget. For iOS, you can check out this post and see if it works for you: https://forum.unity.com/threads/native-share-for-android-ios-open-source.519865/page-4#post-4011874
- I can't build the project to Android, it says "Android resource linking failed: unexpected element 'queries' found in 'manifest'" in the error message
NativeShare adds 'queries' element to AndroidManifest.xml due to the new package visibility change. The build error can be fixed by following these steps: https://developers.google.com/ar/develop/unity/android-11-build (in my tests, changing "Gradle installed with Unity" wasn't necessary). In the worst case, if you are OK with NativeShare not working on some of the affected devices, then you can open NativeShare.aar with WinRAR or 7-Zip and then remove the queries element from AndroidManifest.xml.
- Can't share, it says "java.lang.ClassNotFoundException: com.yasirkula.unity.NativeShare" 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.* { *; }
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 ☕