# SettingsManager

interface SettingsManager

Provides information about the Mobile Payments SDK, such as the SDK version and environment. Also provides access to the payment settings, such as if offline processing is allowed. Additionally, you can display the Square-provided settings screen.

## Properties

trackingConsentState
Link copied to clipboard
abstract val trackingConsentState: TrackingConsentState

The current state of user consent for analytics and performance tracking. This field is changed when consent is updated, either through updateTrackingConsent or through the SDK's built-in consent request (shown when users first visit the payment or settings screen, if no consent was previously provided via API).

## Functions

closeSettings
Link copied to clipboard
abstract fun closeSettings(): Boolean

Programmatically closes the settings screen if it is currently being displayed.

getPaymentSettings
Link copied to clipboard
abstract fun getPaymentSettings(): PaymentSettings

Returns a PaymentSettings, used to determine if offline processing is allowed.

getSdkSettings
Link copied to clipboard
abstract fun getSdkSettings(): SdkSettings

Returns a SdkSettings, used to determine the SDK version and environment.

isShowingSettings
Link copied to clipboard
abstract fun isShowingSettings(): Boolean

Returns `true` if the settings screen is currently being displayed.

showSettings
Link copied to clipboard
abstract fun showSettings(onResult: (SettingsResult) -> Unit)

Used to display the Mobile Payments SDK settings screen.

updateTrackingConsent
Link copied to clipboard
abstract fun updateTrackingConsent(granted: Boolean)

Enables or disables analytics and performance tracking for the Mobile Payments SDK based on user consent. When granted is set to `true`, the SDK will collect data to monitor metrics and performance.