Open Nitrodist opened 1 month ago
No problem with overwriting <application android:name="${applicationName}">
.
To include specific initializations for Flutter that Application
does not include, do it as follows:
import io.flutter.app.FlutterApplication
import io.maido.intercom.IntercomFlutterPlugin
class MyApp : FlutterApplication() {
override fun onCreate() {
super.onCreate()
IntercomFlutterPlugin.initSdk(this, appId = "appId", androidApiKey = "androidApiKey")
}
}
Another thing, don't forget to pass the package name in the file type package br.com.myapp
package br.com.myapp
import io.flutter.app.FlutterApplication
import io.maido.intercom.IntercomFlutterPlugin
class MyApp : FlutterApplication() {
override fun onCreate() {
super.onCreate()
IntercomFlutterPlugin.initSdk(this, appId = "appId", androidApiKey = "androidApiKey")
}
}
@Nitrodist Did you manage to setup the custom application class?
@Nitrodist There is no issue in modifying the AndroidManifest file. You can check the example app for more clarification.
Does anyone know how to set up a custom application class like they describe in these instructions for intercom_flutter?
My problem is that they instruct you to adjust the
<application android:name="${applicationName}">
field inAndroidManifest.xml
and, as you can see, I have flutter defining it as 'applicationName'. I'd prefer not to modify what seems like an important part of the AndroidManifest.xml config?How do I know what the value of that is? And then I should name it in the class below? I'm not very experienced with the Android side!
I've also posted this question to Stackoverflow: https://stackoverflow.com/questions/78444806/how-to-set-up-a-custom-application-class-with-flutters-configuration