ServiceManager

interface ServiceManager

Manages the status of system-level services like GPS, Bluetooth, and Wi-Fi.

A permission being GrantStatus.GRANTED does not guarantee that a feature is functional. For example, if Location permission is granted but the GPS hardware is disabled, location-based features will still fail.

Use ServiceManager in combination with GrantManager or use the high-level GrantAndServiceChecker to verify both software and hardware readiness.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun checkServiceStatus(service: ServiceType): ServiceStatus

Checks the current availability and state of a system service.

Link copied to clipboard
open suspend fun isServiceEnabled(service: ServiceType): Boolean

A convenience check to see if a service is fully ServiceStatus.ENABLED.

Link copied to clipboard
abstract suspend fun openServiceSettings(service: ServiceType): Boolean

Directs the user to the system settings page to enable a specific service.