Closed Doc1faux closed 2 years ago
Moved from @Doc1faux post in https://github.com/crisp-im/crisp-sdk-android/issues/97#issuecomment-1081906359
Do you deploy your app on a Xiaomi device? Because it seems related to a firmware issue on MIUI while calling Activity.recreate()
which Crisp SDK does to apply the correct Chat theming according to the website settings. As I don't own a Xiaomi device to reproduce this crash, I could only provide you a workaround I found which seems to work for some people by disabling auto-dark feature, let me know if it works for you :)
Set forceDarkAllowed
to false
to your app theme and to CrispTheme
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="Theme.MyApplication" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<item name="android:forceDarkAllowed" tools:targetApi="q">false</item>
</style>
<style name="CrispTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:forceDarkAllowed" tools:targetApi="q">false</item>
</style>
</resources>
I've just ordered a Xiaomi Redmi 9A which should be shipped with the Android & MIUI versions which crashes. I'll try it when I receive it.
The workaround does not seem to work but this exception does not cause a "real" crash any way and as it is a known issue tied to Xiaomi's firmware, we cannot do anything :/ So I close the issue.
Moved from @kastriotrama post in https://github.com/crisp-im/crisp-sdk-android/issues/97#issuecomment-1081763804
Tried it with
v3.14.6
but still crashed, updating to the latestv4.9.2
fixed the issue, thank you for your detailed response @Doc1fauxEven though it opens up the activity it throws this exception.