Introduction
Test your video apps with the default log messages to assist with debugging. When you are ready to publish your app, then you can remove these log messages.
Remove log messages
To remove the default log messages from the Native SDK for Android, follow these steps:
- In your app, open the proguard-rules.pro file.
- Add the following code block to remove the log from your app:
-assumenosideeffects class android.util.Log { public static *** v(...); public static *** d(...); public static *** i(...); public static *** w(...); public static *** e(...); }
- Next, open your app's build.gradle file.
- In the
buildTypes
section, add theminifyEnabled
attribute with a value oftrue
. - Below the previous code, add a
proguardFiles
attribute as follows:- Use the
getDefaultProguardFile()
method to get the proguard-android-optimize.txt file from the Android SDK. - Reference the proguard-rules.pro file.
Your build.gradle file should look similar to this:android { compileSdkVersion 25 buildToolsVersion '25.0.0' defaultConfig { ... } buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } }
- Use the