Vinay Raut
Vinay Raut

Reputation: 25

xamarin.forms integration of zendesk chat

I am new to Xamarin development. And, currently I want to integrate the zendesk chat. As per my RnD and after contacting Zendesk support center they are not supporting the xamarin yet. Currently they have sdk for native android and ios respectively. I need you expertize people's guidelines for the development regarding what scenario i should follow to achieve the same using xamarin.forms :

  1. Integrate the both platforms native sdk's for xamarin in each platform and later call it from Xamarin.Forms by adding platform dependency using Device.OnPlatforms . ( I am not sure about this scenario, please suggest)
  2. Create a jar/aar of Zendesk SDK and use it using binding library concept.( I am not sure it will be accessible into ios platform)

Kindly, suggest me the best approach for this. Any sample reference for suggestions will be grateful.

Thanks in advance.

Upvotes: 2

Views: 740

Answers (1)

pinedax
pinedax

Reputation: 9346

I think it's a mix of number 1 and number 2 (and a little extra).

You will need to create the Binding libraries for both iOS and Android. Xamarin has a good documentation of how to do this: Android/Java and IOS/Objective-C

Then you can go either with Xamarin Native (Xamarin.iOS and Xamarin.Android projects) adding the binding to each project. Or you can go with Xamarin.Forms but this will require a little more work as you will need to create an interface of the methods you want to use from the SDKs (most likely all off them) and create the implementations for each platform.

Let's say your interface is called: ISendeskSdkService you will need at least two implementations: ISendeskSdkServiceiOS and ISendeskSdkServiceDroid. These implementations will be on the Platform project and they will be calling the binding libraries you just created and added to each of these projects.

You will be developing your app on top of your interface and which implementation to use will be set on the application load when you are configuring your IoC.

Hope this gives you an idea.

Upvotes: 1

Related Questions