Consent Screen¶
Consent screens are used in mobile apps to ask a user's permission before doing something, such as collecting information about the user.

Definition¶
@Composable
fun ConsentScreen(
consentType: String,
consentScreenSettings: ConsentScreenSettings? = null,
agreeButtonClickListener: ViewClickListener? = null,
disagreeButtonClickListener: ViewClickListener? = null
) { ... }
data class ConsentScreenSettings(
val consentType: String,
val learnMoreUrl: String? = null,
@StringRes val title: Int = R.string.consent_screen_title,
@StringRes val description: Int = R.string.consent_screen_desc,
@StringRes val learnMore: Int = R.string.consent_screen_learn_more,
@StringRes val agreeButtonCaption: Int = R.string.label_allow,
@StringRes val disagreeButtonCaption: Int = R.string.label_deny,
val illustrationSettings: IllustrationSettings = IllustrationSettings(
iconId = com.sap.cloud.mobile.fiori.theme.R.drawable.img_sap_handshake
)
) : BaseScreenSettings
Example¶
ConsentScreen(consentType = ConsentType.USAGE.name,
agreeButtonClickListener = { block(step_usage, true) },
disagreeButtonClickListener = { block(step_usage, false) }
)
Last update: April 5, 2024