WalletNotifications

POST_NOTIFICATIONS helper for ALL of the wallet's foreground notifications (#261-264, generalizing the original #235 dust-sync use): the ongoing operation/sync progress, the dismissible finalization push, and the received-funds / "your turn" alerts.

The runtime permission (API 33+) only controls notification visibility — the foreground service, operations and sync all run regardless, so this is best-effort. The SDK can't show the system permission dialog from a library service, so the host requests PERMISSION with the standard ActivityResultContracts.RequestPermission (one line in a ComponentActivity/Compose), using isGranted to gate the ask.

Properties

Link copied to clipboard
const val PERMISSION: String

The runtime permission gating notification visibility on API 33+.

Functions

Link copied to clipboard
fun isGranted(context: Context): Boolean

True if notifications can be posted (always true below API 33).

Link copied to clipboard

Whether asking makes sense (API 33+ and not already granted).