Skip to main content

Obfuscation

Obfuscation Script

Refer to the following configuration for RC SDK obfuscation scripts:

-keepattributes Exceptions,InnerClasses

-keepattributes Signature

-keep class io.rong.** {*;}
-keep class cn.rongcloud.** {*;}
-keep class * implements io.rong.imlib.model.MessageContent {*;}
-dontwarn io.rong.push.**
-dontnote com.xiaomi.**
-dontnote com.google.android.gms.gcm.**
-dontnote io.rong.**

# The following configurations are required only when using the locationKit plugin provided by RC IMKit. Refer to AMap's official obfuscation guide: https://lbs.amap.com/api/android-sdk/guide/create-project/dev-attention
-keep class com.amap.api.maps.**{*;}
-keep class com.autonavi.**{*;}
-keep class com.amap.api.trace.**{*;}
-keep class com.amap.api.location.**{*;}
-keep class com.amap.api.fence.**{*;}
-keep class com.loc.**{*;}
-keep class com.autonavi.aps.amapapi.model.**{*;}
-keep class com.amap.api.services.**{*;}

-ignorewarnings

When your code contains subclasses inheriting from PushMessageReceiver, keep the custom broadcast receiver class.

Example:

-keep class io.rong.app.DemoNotificationReceiver {*;} 

Replace io.rong.app.DemoNotificationReceiver with the full class path of your custom broadcast receiver.