CleverTap / clevertap-android-sdk

CleverTap Android SDK
MIT License
80 stars 74 forks source link

In-App not show when isMinifyEnabled = true #654

Closed niuzai0222 closed 3 months ago

niuzai0222 commented 3 months ago

Describe the bug "When I set isMinifyEnabled = false, the in-app displays correctly. However, when isMinifyEnabled = true, the in-app does not display, and there is an error message:

Unable to parse inapp notification Invalid JSONJSONObject["ti"] is not a string (class java.lang.Integer : 1721812767).

Here are more log details:

image

To Reproduce

Environment (please complete the following information):

CTLalit commented 3 months ago

I think obfuscation can be avoided for CleverTap sdk as such : -keep com.clevertap.android.sdk.**

It seems minifyEnabled is obfuscating the model classes and hence this issue is happening.

niuzai0222 commented 3 months ago

It seems the issue was related to JSON parsing for CleverTap. Adding -keep class org.json.** { *; } solved the problem.