SatelliteManager  |  API reference  |  Android Developers


public final class SatelliteManager
extends Object



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

Constants

String PROPERTY_SATELLITE_DATA_OPTIMIZED

The applications that are optimized for low bandwidth satellite data should set this property to package name of the application in the manifest to indicate to platform about the same.

Public methods

void registerStateChangeListener(Executor executor, SatelliteStateChangeListener listener)

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

void unregisterStateChangeListener(SatelliteStateChangeListener listener)

Unregisters the SatelliteStateChangeListener previously registered with registerStateChangeListener(Executor,SatelliteStateChangeListener).

Inherited methods

From class java.lang.Object

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.

Constants

PROPERTY_SATELLITE_DATA_OPTIMIZED

public static final String PROPERTY_SATELLITE_DATA_OPTIMIZED

The applications that are optimized for low bandwidth satellite data should set this property to package name of the application in the manifest to indicate to platform about the same. <application> <meta-data android:name="android.telephony.PROPERTY_SATELLITE_DATA_OPTIMIZED" android:value=<package-name>/> </application>

When this meta-data is set in application's manifest, satellite data optimized network is available for application to use.

Constant Value: "android.telephony.PROPERTY_SATELLITE_DATA_OPTIMIZED"

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.