Emarsys
Emarsys uses AnalyticsEvent.VERSION_2
for its analytics events. To add it to your app you need to:
- Include the Emarsys module to your
build.gradle
.implementation ("com.poqstudio:notifications.emarsys:$VERSION_NAME") - Provide the
emarsys_configuration.json
file in the androidraw
folder with the following format:{"applicationCode": String, // Emarsys application code"defaultChannelId": String, // Notification channel id"defaultChannelName": String, // Notification channel name"defaultChannelDesc": String // Notification channel description"loggedUserFieldId": Int // Emarsys contact field id"predictMerchantId": String? // Optional Emarsys predict merchant id} - Inject the singleton
EmarsysManager
into your application and callinit(application: Application, userHash: String?)
- Call
emarsysManager.login(userHash: String)
when the user logins. Your backend should provide you the user hash assha256(email + salt)
- Call
emarsysManager.logout()
when the user logs out.