I am using Sendbird SDK to implement chat functionality in Android app. In debug mode everything works fine, however once I create a release build with minifyEnabled = true to obfuscate the code using R8, although most of the chat functionality works fine, weirdly enough sending an image does not work - it throws an error that seems to be caused by code obfuscation when I make a call to Sendbird SDK's sendFileMessage method
Full error below:
Function ‘onFileMessageSent’ (JVM signature: onFileMessageSent(Lcom/sendbird/android/message/BaseFileMessage;Lcom/sendbird/android/exception/SendbirdException;Z)V) not resolved in class com.sendbird.android.internal.message.MessageManagerImpl$FileMessageSentHandler: public final fun onFileMessageSent(message: com.sendbird.android.message.BaseFileMessage, e: com.sendbird.android.exception.SendbirdException?, fromFallbackApi: kotlin.Boolean): mg.q defined in com.sendbird.android.internal.message.MessageManagerlmpl.FileMessageSentHandler | onFileMessageSent(Lcom/sendbird/android/message/BaseFileMessage;Lcom/sendbird/android/exception/SendbirdException;Z)Lmg/q;
As I am not familiar with Proguard/R8, I'm having a hard time trying to set a rule so that it does not obfuscate the methods mention above, but so far without success :(
By the way, the only proguard rule Sendbird asked us to set is this line:
-dontwarn com.sendbird.android.shadow.**
After that, I tried to add the rules below in attempt to not obfuscate the whole sendbird SDK, but it still doesn't fix the error:
-keep class com.sendbird.** { *; }
-keep interface com.sendbird.** { *; }
-keepclassmembers class com.sendbird.**
I have ran out of ideas at this point, please help.