SatelliteManager


public final class SatelliteManager
extends Object

java.lang.Object
   ↳ 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 ERROR(PackageManager.FEATURE_TELEPHONY_SATELLITE/android.content.pm.PackageManager#FEATURE_TELEPHONY_SATELLITE 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

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public methods

registerStateChangeListener

public void registerStateChangeListener (Executor executor, 
                SatelliteStateChangeListener listener)

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 Manifest.permission.READ_BASIC_PHONE_STATE or android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE or 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

public void unregisterStateChangeListener (SatelliteStateChangeListener listener)

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 Manifest.permission.READ_BASIC_PHONE_STATE or android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE or Manifest.permission.READ_PHONE_STATE or carrier privileges

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