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

Did not solve the horizontal screen problem of Xiaomi devices #86

Closed ShenKang4181 closed 3 years ago

ShenKang4181 commented 3 years ago

After I upgraded the plug-in and confidently removed my method of judging Xiaomi devices, I repackaged the apk, and it still failed in landscape mode. haha image image This is a screenshot of my mobile phone system My phone model is realmex. I flashed miui I think your judgment should be the Xiaomi device or the miui system Or can I customize whether to use the new custom layout

ShenKang4181 commented 3 years ago

image

yasirkula commented 3 years ago

I was checking for Xiaomi but maybe I have to check for MIUI instead.

At the moment, you can execute the following code in Start function to resolve this issue:

using( AndroidJavaClass ajc = new AndroidJavaClass( "com.yasirkula.unity.NativeShare" ) )
    ajc.SetStatic<bool>( "alwaysUseCustomShareDialog", true );
ShenKang4181 commented 3 years ago

I have done it! love you