-
Notifications
You must be signed in to change notification settings - Fork 19
Config
Emarsys SDK now provides a solution for applicationCode
, contactFieldId
and merchantId
change in a convenient way, without restarting the SDK.
Note
Please keep in mind, if any error occurs during the change process the involved feature will be turned off.
-
Turn on Mobile Engage feature
There was no
applicationCode
set in the SDK before and withConfig
it can be set from null to a valid code. -
Turn off Mobile Engage feature
Erase a previously set
applicationCode
and disable the feature by setting it to null. -
Use a different
applicationCode
Change a previously set
applicationCode
to a new one. -
Use a different
contactFieldId
Change a previously set
contactFieldId
, to use a different contactField for authentication.
-
Turn on Predict feature
There was no
merchantId
set in the SDK before and withConfig
it can be set from null to a validmerchantId
. -
Turn off Predict feature
Erase a previously set
merchantId
and disable the feature by setting it to null. -
Use a different
merchantId
Change a previously set
merchantId
to a new one.
Note
If 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)
contactFieldId
could also be changed in the same pattern, by defining it as a method parameter.
Note
When
contactFieldId
has been changed, the SDK will log out the user and asetContact(contactFieldValue)
must be called again with the correctcontactFieldValue
.
Emarsys.getConfig().changeApplicationCode(String applicationCode, Int contactFieldId);
Emarsys.config.changeApplicationCode(applicationCode: String?, contactFieldId: Int, 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.applicationCode
Provides what is the actual merchantId
set in the SDK.
Emarsys.getConfig().getMerchantId();
Emarsys.config.merchantId
Provides what is the actual contactFieldId
set in the SDK.
Emarsys.getConfig().getContactFieldId();
Emarsys.config.contactFieldId
Provides what is the actual hardwareId
used by the SDK.
Emarsys.getConfig().getHardwareId();
Emarsys.config.hardwareId
Provides what is the actual language
of the application.
Emarsys.getConfig().getLanguage();
Emarsys.config.language
Provides what is the actual notificationSettings
set for the application.
Emarsys.getConfig().getNotificationSettings();
Emarsys.config.notificationSettings