yasirkula / UnityNativeShare

A Unity plugin to natively share files (images, videos, documents, etc.) and/or plain text on Android & iOS
MIT License
891 stars 131 forks source link

[Android] Sharing an image with text does not show text. #94

Closed andrewspalato closed 3 years ago

andrewspalato commented 3 years ago

Creating a NativeShare with image and text will not display the text, this happens when sharing via email/gmail and other apps. I expected Facebook to only show image or text due to the fact there is a Facebook SDK which handles this.

Reproduction steps

Platform specs

Player Settings Target API level: 29 Scripting Backend: IL2CPP API Compatibility Level: .NET Standard 2.0

Additional info Logs: Shared on app: com.google.android.gm/com.google.android.gm.ComposeActivityGmailExternal

yasirkula commented 3 years ago

Is text visible in any of the social apps?

andrewspalato commented 3 years ago

Tweets and notes only show an image if it is added by file path or Texture2D. I am pretty sure with previous versions of the plugin, I was able to include images and text in one share.

yasirkula commented 3 years ago

I'm skeptical that I've made a change in the codebase that would cause this. You can download the previous versions from here: https://github.com/yasirkula/UnityNativeShare/releases. Can you find the latest release that didn't have this issue?

andrewspalato commented 3 years ago

I tried an empty minimal project but using the same projects settings as above, and the latest version actually works correctly! Something must be overriding the text being used for the share. This requires more investigation.

andrewspalato commented 3 years ago

Turned out to be a race condition to populate some strings in the app I am working on. The strings were empty at the time of the sharing. I will close this issue and thank you for assistance.