cometchat-go / xamarin-forms-chat-sdk-demo

CometChat Demo App for Xamarin Forms
6 stars 4 forks source link

Incompatibility of SDK with android 5.0.2 #18

Closed joseBarreto closed 5 years ago

joseBarreto commented 5 years ago

Hello, Is CometChat compatible with android 5.0.2? In the documentation, I believe minSdkVersion is 15. However, when running tetes with android 5, the cometchat does not open the individual chat, it does not receive video and audio connection. Performing any of these actions, it closes with layout error in the comentchatUI library.

We also note that this only happens when there is already some message in the user's history that he tries to connect to.

I was unable to get the stack trace, but the exception value is this: "Android.Views.InflateException: Binary XML file line # 1: Error inflating class "

https://developer.cometchat.com/docs/android-quick-start I'm suggesting that minSdkVersion is 15, based on the build.grad of this page.

joseBarreto commented 5 years ago

This error is related to the android notification channels.

Upon receiving a push from firebase, a channel was created on the wrong version of the android.

Use if (Build.VERSION.SdkInt> = BuildVersionCodes.O) { Notification.Builder } else { NotificationCompat.Builder } Solve the problem.