1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] Has Someone implemented Moengage push notification on Android Side

Discussão em 'Mobile' iniciado por Stack, Outubro 15, 2024 às 07:23.

  1. Stack

    Stack Membro Participativo

    this is my kotlin file in mainActivity under the android fodler, i have given all the lines in android mainifest file also

    class SampleApplication : FlutterApplication() {
    override fun onCreate() {
    super.onCreate()
    val moEngage = MoEngage.Builder(this, "Key",DataCenter.DATA_CENTER_3)
    .enableLogs(BuildConfig.DEBUG)
    .configureNotificationMetaData(
    NotificationConfig(
    R.drawable.launcher_icon,
    R.drawable.launcher_icon,
    notificationColor = -1,
    isMultipleNotificationInDrawerEnabled = false,
    isBuildingBackStackEnabled = false,
    isLargeIconDisplayEnabled = true
    )
    )
    .configureLogs(LogConfig(LogLevel.VERBOSE, true))
    .configureFcm(FcmConfig(true))
    .configurePushKit(PushKitConfig(true))
    .configureMoEngageEnvironment(MoEngageEnvironmentConfig(MoEngageEnvironment.DEFAULT))
    .build()
    MoEngage.initialiseDefaultInstance(applicationContext, moEngage, SdkState.ENABLED,true)
    MoEPushHelper.getInstance().registerMessageListener(CustomPushListener(AccountMeta("Key")))
    MoEInAppHelper.getInstance().enableActivityRegistrationOnResume()
    }



    }

    Continue reading...

Compartilhe esta Página