Open aronsommer opened 1 year ago
I've changed the following value to true in the NativeShare.aar file located within this zip file:
Can you replace NativeShare.aar with that one and try again?
Thanks for your quick reply.
I have now built it with the NativeShare.aar file from your zip file. Both the instant and the standard version are crashing at startup. Here is the Logcat:
2023/01/03 10:24:29.141 29496 29496 Error AndroidRuntime FATAL EXCEPTION: main
2023/01/03 10:24:29.141 29496 29496 Error AndroidRuntime Process: com.aronsommer.selfieskater, PID: 29496
2023/01/03 10:24:29.141 29496 29496 Error AndroidRuntime java.lang.RuntimeException: Unable to get provider com.yasirkula.unity.NativeShareContentProvider: java.lang.SecurityException: Provider must not be exported
2023/01/03 10:24:29.141 29496 29496 Error AndroidRuntime at android.app.ActivityThread.installProvider(ActivityThread.java:8313)
2023/01/03 10:24:29.141 29496 29496 Error AndroidRuntime at android.app.ActivityThread.installContentProviders(ActivityThread.java:7810)
2023/01/03 10:24:29.141 29496 29496 Error AndroidRuntime at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7564)
2023/01/03 10:24:29.141 29496 29496 Error AndroidRuntime at android.app.ActivityThread.access$1700(ActivityThread.java:315)
2023/01/03 10:24:29.141 29496 29496 Error AndroidRuntime at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2286)
2023/01/03 10:24:29.141 29496 29496 Error AndroidRuntime at android.os.Handler.dispatchMessage(Handler.java:106)
2023/01/03 10:24:29.141 29496 29496 Error AndroidRuntime at android.os.Looper.loopOnce(Looper.java:226)
2023/01/03 10:24:29.141 29496 29496 Error AndroidRuntime at android.os.Looper.loop(Looper.java:313)
2023/01/03 10:24:29.141 29496 29496 Error AndroidRuntime at android.app.ActivityThread.main(ActivityThread.java:8751)
2023/01/03 10:24:29.141 29496 29496 Error AndroidRuntime at java.lang.reflect.Method.invoke(Native Method)
2023/01/03 10:24:29.141 29496 29496 Error AndroidRuntime at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
2023/01/03 10:24:29.141 29496 29496 Error AndroidRuntime at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
2023/01/03 10:24:29.141 29496 29496 Error AndroidRuntime Caused by: java.lang.SecurityException: Provider must not be exported
2023/01/03 10:24:29.141 29496 29496 Error AndroidRuntime at com.yasirkula.unity.NativeShareContentProvider.attachInfo(NativeShareContentProvider.java:80)
2023/01/03 10:24:29.141 29496 29496 Error AndroidRuntime at android.app.ActivityThread.installProvider(ActivityThread.java:8308)
2023/01/03 10:24:29.141 29496 29496 Error AndroidRuntime ... 11 more
I've learnt that there are some restrictions in instant apps but couldn't find a definitive answer as to whether or not these exceptions are part of the restrictions. The most related pages I've found are:
I think that this issue will remain open for quite some time, unfortunately.
In my Android Instant app its not possible to share the screenshot which was generated with the example code. Only the text gets shared without the image. In the standard Android app its working without problem.
I have built the Android Instant app with Unity version 2021.3.12f1 on macOS 12.6.2 and used the Google Play Instant plugin com.google.play.instant-1.8.0.unitypackage.
I have tested it on my Samsung S10e and its not possible to share the image over the Gmail or the Samsung Messages app.
I have seen following error in Logcat in
com.google.android.gm
. And I will attach a screenshot with the error message in the Samsung Messages app.