Recent searches


No recent searches

Has anyone integrated Zendesk with Flutter ?



Posted Jan 24, 2024

I'm currently developing a Flutter app. Since Zendesk doesn't have package made for Flutter, I'm doing custom implementation for both Android and iOS.
I've created a separate Android Studio project and implemented it over there. It was working fine over there. But after using the same code in Flutter and invoking native code, I'm facing this error here:
https://stackoverflow.com/questions/76764955/flutter-application-when-calling-an-android-native-code-generates-error-inflati
On iOS, The code is running fine but I'm not able to navigate to a different screen as provided by the SDK.
Is there anyone who have implemented Zendesk in Flutter? Can anyone help me with it?


0

3

3 comments

override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
super.configureFlutterEngine(flutterEngine)
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, "br.com.flowing/channels").setMethodCallHandler {
call, result ->
if (call.method == "openZenDeskSupport") {
openZenDeskSupport()
result.success(null)
} else{
result.notImplemented()
}
}}
private fun initZenDesk() {
Zendesk.INSTANCE.init(this, {URL},
{ID},
{CLIENT_ID})
//if you need to share the user and email you will need to change this line below
val identity: Identity = AnonymousIdentity()
Zendesk.INSTANCE.setIdentity(identity)

Support.INSTANCE.init(Zendesk.INSTANCE)

}
private fun openZenDeskSupport() {
try {
RequestActivity.builder().show(context)
}catch (e: Exception){
Log.e("Erro",e.toString())
}
}

<activity
android:name=".{nameApp}.MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>

 

1


Thanks, I've implemented all the things you just suggested. But I'm still getting the error. 

I compared AndroidManifest.xml file with this and the only difference I see there is:
android:name=".{nameApp}.MainActivity"

I don't know what should I put in nameApp if this is the solution. For eg, my app's name is Project and I tried putting .Project.MainActivity as well. But it didn't work out. Help me out here. Thanks. :)

Durval Peripato Neto 

0


Hello Tej Bikram Karki Can you tell me how did you start implementing this Flutter SKD , how much time did it take from you and so on ,thanks in advance 

 

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post