How to Set Ignore-Storage Property on Haptik bots

In order to set the Ignore-storage property while initializing Haptik bots, you can use the following:

For Android, you can set ignore-storage using the following snippet:

ignoreStorage = true

Similarly for iOS,

builder.ignoreStorage = true

Note: For Android, the SDK version should be 1.4.2 and for iOS, it should be 0.3.0.

Also, the implementation for ignore-storage would be while adding the init settings:

For Android:

val initData = InitData().apply {
    primaryColor = "#420420"
    composerPlaceholder = "Type message...."
    noHeader = true
    initializeLanguage = "en"

    ignoreStorage  = true
}
HaptikSDK.init(applicationContext, initData)

For iOS,

let customSetting = HPCustomBuilder.build { (builder) in
    builder.composerPlaceholder = "Type message...."
    builder.noHeader = true
    builder.privacyPolicyUrl =  "https://policies.loremipsum.com/privacy?hl=en-US"
    builder.initializeLanguage = "hi"
    builder.loaderAnimate = true
    builder.primaryColor = "#420420"
    builder.ignoreStorage = true
}
HPKit.sharedSDK.setCustomSettings(settings: customSetting)


Can’t find what you’re looking for? Email us at support@haptik.ai.