LocalzBackgroundSDK

LocalzBackgroundSDK is the main entry point for interacting with the Localz Background SDK. It provides methods for configuration, authentication, state management, and handling Firebase messages.

Functions

Link copied to clipboard
suspend fun configure(key: String, environment: LocalzEnvironment, appVersion: String)

Configures the SDK with the provided key, environment, and app version.

Link copied to clipboard
suspend fun currentUsername(): String

Retrieves the current username of the logged-in user.

Link copied to clipboard

Handles a Firebase message from Localz.

Link copied to clipboard

Checks if the required permissions are granted.

Link copied to clipboard

Initializes the SDK and prepares it for use.

Link copied to clipboard
suspend fun isInitialized(): Boolean

Checks if the SDK is initialized.

Link copied to clipboard

Determines if the given Firebase message originates from Localz.

Link copied to clipboard
suspend fun loginAzureSSO(idToken: String, accessToken: String, refreshToken: String? = null): LocalzResult<BackgroundSdkState>

Logs in using Azure SSO authentication.

Link copied to clipboard
suspend fun loginBasicAuth(username: String, password: String): LocalzResult<BackgroundSdkState>

Logs in using basic authentication.

Link copied to clipboard
suspend fun loginGenericSSO(idToken: String, accessToken: String? = null, refreshToken: String? = null): LocalzResult<BackgroundSdkState>

Logs in using Generic SSO authentication with tokens.

Link copied to clipboard
suspend fun loginGenericSSOWithAuthCode(authorizationCode: String, redirectUrl: String): LocalzResult<BackgroundSdkState>

Logs in using Generic SSO authentication with authorization code.

Link copied to clipboard
suspend fun loginGoogleSSO(googleServerAuthCode: String): LocalzResult<BackgroundSdkState>

Logs in using Google SSO authentication.

Link copied to clipboard

Logs in using MDLP SSO authentication.

Link copied to clipboard

Logs out the current user.

Link copied to clipboard

Provides a Flow of log reports generated by the SDK.

Link copied to clipboard
fun stateFlow(): StateFlow<BackgroundSdkState>

Provides a StateFlow of the current BackgroundSdkState.