Help Center/Details/

Additional Configuration for Android

After importing the Pangle Unity plugin, check the following configurations: add permissions and provider in the AndroidManifest.xml and avoid obfuscate code of Pangle sdk.

Add Permissions

Add the permissions in the Androidmanifest.xml.

<!-- Necessary permissions -->
<uses-permission android:name="android.permission.INTERNET"  data-tomark-pass />

<!-- optional  permissions-->       
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"  data-tomark-pass /> 

<!-- If there are video-related advertisements and use textureView to play, be sure to add them, otherwise the screen will be black -->
<uses-permission android:name="android.permission.WAKE_LOCK"  data-tomark-pass />

Note: Pangle SDK does not compulsorily obtain the above permissions, and the SDK can work normally even if the optional permissions are not obtained; obtaining the above permissions will help pangle SDK provide a better experience and performance.

Add TTMultiProvider

You need to add the TTMultiProvider under the application section in the Androidmanifest.xml

<provider  android:name="com.bytedance.sdk.openadsdk.multipro.TTMultiProvider"
android:authorities="${applicationId}.TTMultiProvider"
android:exported="false"  data-tomark-pass />

Note: the TTMultiProvider is needed for both Single-process and multi-process environments.

Androidmanifest.xml must be configured under the Assets-Plugins-Android path. Missing TTMultiProvider may cause abnormal online statistics display.

4087cec1-5b99-42dd-b1ca-ff12d40eb0d8.png

Obfuscation

When generating the Android platform release installation package, you need to check the obfuscated configuration. If you need to use Proguard to obfuscate your code, be sure not to obfuscate the SDK code. Please add the following configuration at the end of the proguard-user.txt file (or other obfuscated files)

-keep class com.bytedance.sdk.** { *; }
-keep class com.pgl.sys.ces.* {*;}
-keep class com.bytedance.android.NativeAdManager {*;}
-keep class com.bytedance.android.IntersititialView {*;}
-keep class com.bytedance.android.BannerView {*;}

Note: If the SDK code is obfuscated, it will cause the ad to fail to display or other anomalies.

Did the content solve your problem?