Package-level declarations

Types

Link copied to clipboard
object Constants

Contains constant values used throughout the MTN MOMO SDK sample application.

Link copied to clipboard
class CredentialStorage(context: Context)

Secure credential storage backed by EncryptedSharedPreferences.

Link copied to clipboard

Production DispatcherProvider implementation that delegates to the real Dispatchers.

Link copied to clipboard

Abstraction over the standard CoroutineDispatcher set to allow dispatcher injection in tests.

Link copied to clipboard
data class SampleConfig(val apiVersionV1: String, val apiVersionV2: String, val environment: String, val providerCallbackHost: String, val apiUserId: String, val collectionPrimaryKey: String, val collectionSecondaryKey: String, val remittancePrimaryKey: String, val remittanceSecondaryKey: String, val disbursementsPrimaryKey: String, val disbursementsSecondaryKey: String)

Runtime configuration values required by the sample app to initialise the MTN MOMO SDK.

Link copied to clipboard
data class SnackBarComponentConfiguration(val message: String = "", val actionLabel: String? = null, val duration: ERROR CLASS: Symbol not found for SnackbarDuration = SnackbarDuration.Short)

Configuration data for displaying a Snackbar, encapsulating message text, optional action label, and display duration.

Link copied to clipboard
data class SnackBarThemeOptions(val messageTextColor: String = "#FFFFFF", val actionTextColor: String = "#FFCB05", val backgroundColor: String = "#004F71")

Theming options for a snackbar, specifying colors as hex strings for message text, action text, and background.

Link copied to clipboard
object Utils

Utility object providing general-purpose helper functions for the sample app.

Functions

Link copied to clipboard

This is required to fix keyboard overlapping content in a Composable screen. This functionality is applied after the setContent function of the activity is called.

Link copied to clipboard
suspend fun ERROR CLASS: Symbol not found for SharedFlow<io/rekast/sdk/sample/utils/SnackBarComponentConfiguration>.hookSnackBar(scaffoldState: ERROR CLASS: Symbol not found for ScaffoldState, action: () -> Unit = {})

Collects this SharedFlow and shows a Snackbar via scaffoldState for each emitted SnackBarComponentConfiguration that contains a non-empty message.

Link copied to clipboard

This function checks if the device is online

Link copied to clipboard
fun String?.parseColor(): ERROR CLASS: Symbol not found for androidx.compose.ui.graphics.Color

Parse this String to a color code to be used in compose. Color code must either a). begin with pound sign ('#') and should be of 6 valid characters or b). be equal to 'primaryColor', 'primaryVariantColor' or 'errorColor'