Skip to main content

Introduction

Integrating with the SDK

import com.osano.uc_mobile_sdk.UniversalConsentSDK
import com.osano.uc_mobile_sdk.callback.UniversalConsentEventsCallBack
import com.osano.uc_mobile_sdk.data.remote.response.Actions
import com.osano.uc_mobile_sdk.util.HeadingTab

private lateinit var universalConsentSDK: UniversalConsentSDK

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
universalConsentSDK = UniversalConsentSDK()
.initWith(this, clientId, configId)

universalConsentSDK
.hideTab(HeadingTab.None)
universalConsentSDK.build()
}
note

The configId and clientId parameters are mandatory and must match your configuration on the Osano website. The

Optional Configuration

.setEmail(emailString)
.setEventsCallBack(this)
.setThemeColors(
"#FF0000",
themeDarkColor,
"",
themeBrightColor,
themeBrightColor
)
.setMainTabText("CONSENTS", "COMMUNICATION")
.rowMainMoreTvText("DETAILS")
.setSaveSwitchDialogText("Save HEADER text",
"Save Message text",
"Done")
.setSaveSwitchDialogText(
"Save Dialog Title",
"description for save dialog",
"OK",
"Close"
)
.setIdentityEmailDialogText(
"Email Header",
"Email Dialog Message Description, Email Dialog Message Description. Email Dialog Message Description",
"Send Email",
"Email Input Filed",
"Invalid identity email."
)
.setIdentityVerifyDialogText(
"Verify dialog header",
"Verify Dialog Message Description, Dialog Message Description, Dialog Message Description",
"Verify Code",
"Verify Code Input Field",
"Verification Code invalid"
)
.setSuccessfulSubmitDialogText(
"Successful Dialog header",
"Successful Dialog Message Description, Dialog Message Description",
"Done"
)
.setIdentityVerifiedDialogText(
"Verified Dialog header",
"Verified Dialog Message Description, Dialog Message Description",
"Verified"
)

.fontStyle(FontStyle.FONT_STYLE_BOLD,FontStyle.FONT_STYLE_ITALIC,FontStyle.FONT_STYLE_BOLD_ITALIC,FontStyle.FONT_STYLE_BOLD)