getDevice

abstract fun getDevice(): Flow<Device?>

Get a cached device used to receive push notifications.

Collecting the returned Flow accesses persistent storage and may throw an IOException if the stored device cannot be read. Consumers that treat device retrieval as a best-effort operation should handle IOException explicitly without swallowing coroutine cancellation.

Return

stream of Device.

Throws

when the returned flow is collected and persistent storage cannot be read.