ChannelPluginSettings
ChannelPluginSettings
is an object that contains information to boot up ChannelIO
, specifically use in boot
. You should provide a value to userId property if you want to boot with a registered user.
public class ChannelPluginSettings {
private String pluginKey;
private String memberId;
private String memberHash;
private boolean debugMode;
private boolean enabledTrackDefaultEvent;
private boolean hideDefaultInAppPush;
private CHLocale locale;
private LauncherConfig launcherConfig;
private Boolean unsubscribed;
public ChannelPluginSettings(@NonNull String pluginKey) {
this.pluginKey = pluginKey;
this.userId = null;
this.debugMode = false;
this.enabledTrackDefaultEvent = true;
this.hideDefaultInAppPush = false;
this.locale = null;
}
}
setMemberId
Return ChannelPluginSettings
object with setting memberId
public ChannelPluginSettings setMemberId(String memberId)
parameter | type | description |
---|---|---|
userId | String | a user id |
Do not recommend to use a predictable value for
userId
Because
userId
is a unique value that we use to identify users, we do not recommend to use predictable values such as numerical combination, email address, user name and etc. It may cause privacy and security issues. We recommend to use higher than 256 bits hash value.
Or use member hash.
setMemberHash
set member hash that matched with member id by reserved member hash salt.
public ChannelPluginSettings setMemberHash(@Nullable String memberHash)
setDebugMode
Return ChannelPluginSettings
object with setting debug mode
public ChannelPluginSettings setDebugMode(boolean debug)
parameter | type | description |
---|---|---|
debugMode | boolean | a flag to indicate debug mode |
setHideDefaultInAppPush
Return ChannelPluginSettings
object with setting the flag for default in-app push
public ChannelPluginSettings setHideDefaultInAppPush(boolean hideDefaultInAppPush)
parameter | type | description |
---|---|---|
hideDefaultInAppPush | boolean | a flag to set visibility of the default in-app push |
setEnabledTrackDefaultEvent
Return ChannelPluginSettings
object with setting the flag for tracking default event
public ChannelPluginSettings setEnabledTrackDefaultEvent(boolean enabledTrackDefaultEvent)
parameter | type | description |
---|---|---|
enabledTrackDefaultEvent | boolean | a flag to enable tracking default events |
setLocale
Return ChannelPluginSettings
object with setting locale code (please refer CHLocale)
public ChannelPluginSettings setLocale(CHLocale locale)
parameter | type | description |
---|---|---|
CHLocale | enum | locale code |
setUnsubscribed
Set user unsubsribe marketing message programmatically.
If user's unsubscribed flag is true, flag will be not changed programmatically.
Only user action by settings page will applied.
public ChannelPluginSettings setUnsubscribed(boolean unsubscribed)
setLauncherConfig
Set default button position left or right, margin x, margin y.
(please refer LauncherConfig)
public ChannelPluginSettings setLauncherConfig(@Nullable LauncherConfig launcherConfig)
Updated almost 3 years ago