-
-
Notifications
You must be signed in to change notification settings - Fork 150
-
I modified the manifest file in NativeShare.aar.
As shown below
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.yasirkula.unity"> <application> <activity android:name=".NativeShareCustomShareDialogActivity" android:theme="@style/Theme.NativeShareTransparent" android:exported="true"> <intent-filter> <action android:name="android.intent.action.SEND" /> <data android:mimeType="*/*" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.SEND_MULTIPLE" /> <data android:mimeType="*/*" /> </intent-filter> </activity> <receiver android:name=".NativeShareBroadcastListener" android:exported="false" /> <provider android:name="com.yasirkula.unity.NativeShareContentProvider" android:authorities="${applicationId}.NativeShareContentProvider" android:exported="false" android:grantUriPermissions="true" /> </application> <uses-sdk android:targetSdkVersion="4" /> <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/> </manifest>
I replaced the <queries> and <intent> tags with <intent-filter>.
I also added QUERY_ALL_PACKAGES permission.
This works well on Unity 2019439f1.
It met my needs, but I don't know if that would have some bad consequences.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 2 replies
-
It can have bad consequences because QUERY_ALL_PACKAGES permission requires special permission on Google Play: https://support.google.com/googleplay/android-developer/answer/10158779?hl=en
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks for your reply.
I have tried update Gradle, but for some reason, it caused apk build fail.
It seems the best way for me is to upgrade Unity to a version that supports the new Gradle version.
Beta Was this translation helpful? Give feedback.
All reactions
-
If the APK build issue can't be resolved, then that seems to be the only option if you wish to continue using NativeShare with queries tag.
Beta Was this translation helpful? Give feedback.