SatelliteManager


class SatelliteManager
kotlin.Any
   ↳ android.telephony.satellite.SatelliteManager

Manages satellite states such as monitoring enabled state and operations such as provisioning, pointing, messaging, location sharing, etc.

To get the object, call Context.getSystemService(String) with Context.SATELLITE_SERVICE.

SatelliteManager is intended for use on devices with feature android.content.pm.PackageManager#FEATURE_TELEPHONY_SATELLITE. On devices without the feature, the behavior is not reliable.
Requires the PackageManager#FEATURE_TELEPHONY_SATELLITE feature which can be detected using PackageManager.hasSystemFeature(String).

Summary

Public methods
Unit

Registers a SatelliteStateChangeListener to receive callbacks when the satellite state may have changed.

Unit

Unregisters the SatelliteStateChangeListener previously registered with registerStateChangeListener(java.util.concurrent.Executor,android.telephony.satellite.SatelliteStateChangeListener).

Public methods

registerStateChangeListener

fun registerStateChangeListener(
    executor: Executor,
    listener: SatelliteStateChangeListener
): Unit

Registers a SatelliteStateChangeListener to receive callbacks when the satellite state may have changed.

The callback method is immediately triggered with latest state on invoking this method if the state change has been notified before.
Requires android.Manifest.permission#READ_BASIC_PHONE_STATE or android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE or android.Manifest.permission#READ_PHONE_STATE or carrier privileges

Parameters
executor Executor: The Executor where the listener will be invoked This value cannot be null. Callback and listener events are dispatched through this Executor, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use Context.getMainExecutor(). Otherwise, provide an Executor that dispatches to an appropriate thread.
listener SatelliteStateChangeListener: The listener to monitor the satellite state change This value cannot be null.

unregisterStateChangeListener

fun unregisterStateChangeListener(listener: SatelliteStateChangeListener): Unit

Unregisters the SatelliteStateChangeListener previously registered with registerStateChangeListener(java.util.concurrent.Executor,android.telephony.satellite.SatelliteStateChangeListener).

It will be a no-op if the listener is not currently registered.
Requires android.Manifest.permission#READ_BASIC_PHONE_STATE or android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE or android.Manifest.permission#READ_PHONE_STATE or carrier privileges

Parameters
listener SatelliteStateChangeListener: The listener to unregister This value cannot be null.