-
Notifications
You must be signed in to change notification settings - Fork 18
Config
Emarsys SDK now provides a solution for applicationCode and merchantId change in a convenient way, without restarting the SDK.
NotePlease keep in mind, if any error occurs during the change process the involved feature will be turned off.
NoteWhen
changeApplicationCodehas been called, the SDK will log out the user and asetContact(contactFieldId, contactFieldValue)must be called again with the correctcontactFieldValueandcontactFieldId.
-
Turn on Mobile Engage feature
There was no
applicationCodeset in the SDK before and withConfigit can be set from null to a valid code.
NoteIn that case when the SDK was setup with null
applicationCode, the developer is responsible to callsetPushTokenwith the valid pushToken if it was received during when the SDK was in inactive state
-
Turn off Mobile Engage feature
Erase a previously set
applicationCodeand disable the feature by setting it to null. -
Use a different
applicationCodeChange a previously set
applicationCodeto a new one. If there was a pushToken set, the SDK saves it, callsclearPushTokenbefore executing theapplicationCodechange and restores the original pushToken for the newapplicationCode.
-
Turn on Predict feature
There was no
merchantIdset in the SDK before and withConfigit can be set from null to a validmerchantId. -
Turn off Predict feature
Erase a previously set
merchantIdand disable the feature by setting it to null. -
Use a different
merchantIdChange a previously set
merchantIdto a new one.
NoteIf any error occurs during the change process the Mobile Engage feature will be turned off.
Emarsys.getConfig().changeApplicationCode(String applicationCode);Emarsys.config.changeApplicationCode(applicationCode: String?, completionListener: CompletionListener? = null)Errors can be handled inside an optional CompletionListener added to the method call.
Emarsys.getConfig().changeMerchantId(String merchantId);Emarsys.config.changeMerchantId(merchantId: String?)Provides what is the actual applicationCode set in the SDK.
Emarsys.getConfig().getApplicationCode();Emarsys.config.applicationCodeProvides what is the actual merchantId set in the SDK.
Emarsys.getConfig().getMerchantId();Emarsys.config.merchantIdProvides what is the actual contactFieldId set in the SDK.
Emarsys.getConfig().getContactFieldId();Emarsys.config.contactFieldIdDeprecated Please use clientId instead
Provides what is the actual clientId used by the SDK. It is deprecated, please use clientId instead.
Emarsys.getConfig().getHardwareId();Emarsys.config.hardwareIdProvides what is the actual clientId used by the SDK.
Emarsys.getConfig().getClientId();Emarsys.config.clientIdProvides what is the actual language of the application.
Emarsys.getConfig().getLanguage();Emarsys.config.languageProvides what is the actual notificationSettings set for the application.
Emarsys.getConfig().getNotificationSettings();Emarsys.config.notificationSettingsProvides if automaticPushSendingEnabled is enabled for the application.
Emarsys.getConfig().isAutomaticPushSendingEnabled();Emarsys.config.automaticPushSendingEnabledProvides the sdkVersion of the application.
Emarsys.getConfig().getSdkVersion();Emarsys.config.sdkVersion