v3rm0n / intercom_flutter

Flutter wrapper for Intercom libraries
95 stars 141 forks source link

IntercomFlutterPlugin #477

Closed ashish-live closed 2 weeks ago

ashish-live commented 3 weeks ago

Any specific reason why do we need to initialize it from MainActivity.kt in Android as we are already initializing this in our main.dart?

IntercomFlutterPlugin.initSdk(this, appId = "appId", androidApiKey = "androidApiKey")

deepak786 commented 3 weeks ago

According to the documentation, Intercom must be initialized in the Application onCreate. Otherwise it throws the following error:

Caused by io.intercom.android.sdk.exceptions.IntercomIntegrationException
Intercom was not initialized correctly, Intercom.initialize() needs to be called in onCreate() in your Application class.