In-App not show when isMinifyEnabled = true
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:
To Reproduce
Environment (please complete the following information):
- Device: [SamSung,xiaomi]
- OS: [Android13,Android14]
- CleverTap SDK Version [com.clevertap.android:clevertap-android-sdk v6.2.1]
- Android Studio Version [Android Studio Koala | 2024.1.1 Patch ]
- compileSdk [34]
- AGP [8.5.0]
- androidx.core [1.10.1]
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.
It seems the issue was related to JSON parsing for CleverTap.
Adding -keep class org.json.** { *; } solved the problem.