-
Anonymous
Кто-нибудь реализовал push-уведомление Moengage на стороне Android?
Сообщение
Anonymous »
это мой файл kotlin в mainActivity под android fodler, я также предоставил все строки в основном файле android
Код: Выделить всё
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()
}
}
Подробнее здесь:
https://stackoverflow.com/questions/790 ... droid-side
1728986544
Anonymous
это мой файл kotlin в mainActivity под android fodler, я также предоставил все строки в основном файле android
[code]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()
}
[/code]
}
Подробнее здесь: [url]https://stackoverflow.com/questions/79089430/has-someone-implemented-moengage-push-notification-on-android-side[/url]