Skip to main content

Obfuscation

Obfuscation Script

Add obfuscation configuration in the proguard-rules.pro file under the project directory.

-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.**

-ignorewarnings

When there are subclasses inheriting from PushMessageReceiver in the code, you need to keep the created subclass broadcasts.

Example:

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

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