IT. Expert System.

Android Reference

ServiceState


android.telephony

Class ServiceState

  • All Implemented Interfaces:
    Parcelable


    public class ServiceState
    extends Object
    implements Parcelable
    Contains phone state and service related information. The following phone information is included in returned ServiceState:
    • Service state: IN_SERVICE, OUT_OF_SERVICE, EMERGENCY_ONLY, POWER_OFF
    • Roaming indicator
    • Operator name, short name and numeric id
    • Network selection mode
    • Field Detail

      • STATE_IN_SERVICE

        public static final int STATE_IN_SERVICE
        Normal operation condition, the phone is registered with an operator either in home network or in roaming.
        See Also:
        Constant Field Values
      • STATE_OUT_OF_SERVICE

        public static final int STATE_OUT_OF_SERVICE
        Phone is not registered with any operator, the phone can be currently searching a new operator to register to, or not searching to registration at all, or registration is denied, or radio signal is not available.
        See Also:
        Constant Field Values
      • STATE_EMERGENCY_ONLY

        public static final int STATE_EMERGENCY_ONLY
        The phone is registered and locked. Only emergency numbers are allowed.
        See Also:
        Constant Field Values
      • STATE_POWER_OFF

        public static final int STATE_POWER_OFF
        Radio of telephony is explicitly powered off.
        See Also:
        Constant Field Values
      • RIL_RADIO_TECHNOLOGY_UNKNOWN

        public static final int RIL_RADIO_TECHNOLOGY_UNKNOWN
        See Also:
        Constant Field Values
      • RIL_RADIO_TECHNOLOGY_GPRS

        public static final int RIL_RADIO_TECHNOLOGY_GPRS
        See Also:
        Constant Field Values
      • RIL_RADIO_TECHNOLOGY_EDGE

        public static final int RIL_RADIO_TECHNOLOGY_EDGE
        See Also:
        Constant Field Values
      • RIL_RADIO_TECHNOLOGY_UMTS

        public static final int RIL_RADIO_TECHNOLOGY_UMTS
        See Also:
        Constant Field Values
      • RIL_RADIO_TECHNOLOGY_IS95A

        public static final int RIL_RADIO_TECHNOLOGY_IS95A
        See Also:
        Constant Field Values
      • RIL_RADIO_TECHNOLOGY_IS95B

        public static final int RIL_RADIO_TECHNOLOGY_IS95B
        See Also:
        Constant Field Values
      • RIL_RADIO_TECHNOLOGY_1xRTT

        public static final int RIL_RADIO_TECHNOLOGY_1xRTT
        See Also:
        Constant Field Values
      • RIL_RADIO_TECHNOLOGY_EVDO_0

        public static final int RIL_RADIO_TECHNOLOGY_EVDO_0
        See Also:
        Constant Field Values
      • RIL_RADIO_TECHNOLOGY_EVDO_A

        public static final int RIL_RADIO_TECHNOLOGY_EVDO_A
        See Also:
        Constant Field Values
      • RIL_RADIO_TECHNOLOGY_HSDPA

        public static final int RIL_RADIO_TECHNOLOGY_HSDPA
        See Also:
        Constant Field Values
      • RIL_RADIO_TECHNOLOGY_HSUPA

        public static final int RIL_RADIO_TECHNOLOGY_HSUPA
        See Also:
        Constant Field Values
      • RIL_RADIO_TECHNOLOGY_HSPA

        public static final int RIL_RADIO_TECHNOLOGY_HSPA
        See Also:
        Constant Field Values
      • RIL_RADIO_TECHNOLOGY_EVDO_B

        public static final int RIL_RADIO_TECHNOLOGY_EVDO_B
        See Also:
        Constant Field Values
      • RIL_RADIO_TECHNOLOGY_EHRPD

        public static final int RIL_RADIO_TECHNOLOGY_EHRPD
        See Also:
        Constant Field Values
      • RIL_RADIO_TECHNOLOGY_LTE

        public static final int RIL_RADIO_TECHNOLOGY_LTE
        See Also:
        Constant Field Values
      • RIL_RADIO_TECHNOLOGY_HSPAP

        public static final int RIL_RADIO_TECHNOLOGY_HSPAP
        See Also:
        Constant Field Values
      • RIL_RADIO_TECHNOLOGY_GSM

        public static final int RIL_RADIO_TECHNOLOGY_GSM
        GSM radio technology only supports voice. It does not support data.
        See Also:
        Constant Field Values
      • REGISTRATION_STATE_NOT_REGISTERED_AND_NOT_SEARCHING

        public static final int REGISTRATION_STATE_NOT_REGISTERED_AND_NOT_SEARCHING
        See Also:
        Constant Field Values
      • REGISTRATION_STATE_HOME_NETWORK

        public static final int REGISTRATION_STATE_HOME_NETWORK
        See Also:
        Constant Field Values
      • REGISTRATION_STATE_NOT_REGISTERED_AND_SEARCHING

        public static final int REGISTRATION_STATE_NOT_REGISTERED_AND_SEARCHING
        See Also:
        Constant Field Values
      • REGISTRATION_STATE_REGISTRATION_DENIED

        public static final int REGISTRATION_STATE_REGISTRATION_DENIED
        See Also:
        Constant Field Values
      • REGISTRATION_STATE_UNKNOWN

        public static final int REGISTRATION_STATE_UNKNOWN
        See Also:
        Constant Field Values
      • REGISTRATION_STATE_ROAMING

        public static final int REGISTRATION_STATE_ROAMING
        See Also:
        Constant Field Values
    • Constructor Detail

      • ServiceState

        public ServiceState()
        Empty constructor
      • ServiceState

        public ServiceState(ServiceState s)
        Copy constructors
        Parameters:
        s - Source service state
      • ServiceState

        public ServiceState(Parcel in)
        Construct a ServiceState object from the given parcel.
    • Method Detail

      • newFromBundle

        public static ServiceState newFromBundle(Bundle m)
        Create a new ServiceState from a intent notifier Bundle This method is used by PhoneStateIntentReceiver and maybe by external applications.
        Parameters:
        m - Bundle from intent notifier
        Returns:
        newly created ServiceState
      • describeContents

        public int describeContents()
        Description copied from interface: Parcelable
        Describe the kinds of special objects contained in this Parcelable's marshalled representation.
        Specified by:
        describeContents in interface Parcelable
        Returns:
        a bitmask indicating the set of special object types marshalled by the Parcelable.
      • getRoaming

        public boolean getRoaming()
        Get current roaming indicator of phone (note: not just decoding from TS 27.007 7.2)
        Returns:
        true if TS 27.007 7.2 roaming is true and ONS is different from SPN
      • isEmergencyOnly

        public boolean isEmergencyOnly()
      • getCdmaRoamingIndicator

        public int getCdmaRoamingIndicator()
      • getCdmaDefaultRoamingIndicator

        public int getCdmaDefaultRoamingIndicator()
      • getCdmaEriIconIndex

        public int getCdmaEriIconIndex()
      • getCdmaEriIconMode

        public int getCdmaEriIconMode()
      • getOperatorAlphaLong

        public String getOperatorAlphaLong()
        Get current registered operator name in long alphanumeric format. In GSM/UMTS, long format can be up to 16 characters long. In CDMA, returns the ERI text, if set. Otherwise, returns the ONS.
        Returns:
        long name of operator, null if unregistered or unknown
      • getOperatorAlphaShort

        public String getOperatorAlphaShort()
        Get current registered operator name in short alphanumeric format. In GSM/UMTS, short format can be up to 8 characters long.
        Returns:
        short name of operator, null if unregistered or unknown
      • getOperatorNumeric

        public String getOperatorNumeric()
        Get current registered operator numeric id. In GSM/UMTS, numeric format is 3 digit country code plus 2 or 3 digit network code.
        Returns:
        numeric format of operator, null if unregistered or unknown
      • getIsManualSelection

        public boolean getIsManualSelection()
        Get current network selection mode.
        Returns:
        true if manual mode, false if automatic mode
      • hashCode

        public int hashCode()
        Description copied from class: Object
        Returns an integer hash code for this object. By contract, any two objects for which Object.equals(java.lang.Object) returns true must return the same hash code value. This means that subclasses of Object usually override both methods or neither method.

        Note that hash values must not change over time unless information used in equals comparisons also changes.

        See Writing a correct hashCode method if you intend implementing your own hashCode method.

        Overrides:
        hashCode in class Object
        Returns:
        this object's hash code.
        See Also:
        Object.equals(java.lang.Object)
      • equals

        public boolean equals(Object o)
        Description copied from class: Object
        Compares this instance with the specified object and indicates if they are equal. In order to be equal, o must represent the same object as this instance using a class-specific comparison. The general contract is that this comparison should be reflexive, symmetric, and transitive. Also, no object reference other than null is equal to null.

        The default implementation returns true only if this == o. See Writing a correct equals method if you intend implementing your own equals method.

        The general contract for the equals and Object.hashCode() methods is that if equals returns true for any two objects, then hashCode() must return the same value for these objects. This means that subclasses of Object usually override either both methods or neither of them.

        Overrides:
        equals in class Object
        Parameters:
        o - the object to compare this instance with.
        Returns:
        true if the specified object is equal to this Object; false otherwise.
        See Also:
        Object.hashCode()
      • rilRadioTechnologyToString

        public static String rilRadioTechnologyToString(int rt)
        Convert radio technology to String
        Parameters:
        radioTechnology -
        Returns:
        String representation of the RAT
      • toString

        public String toString()
        Description copied from class: Object
        Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
           getClass().getName() + '@' + Integer.toHexString(hashCode())

        See Writing a useful toString method if you intend implementing your own toString method.

        Overrides:
        toString in class Object
        Returns:
        a printable representation of this object.
      • setStateOutOfService

        public void setStateOutOfService()
      • setStateOff

        public void setStateOff()
      • setState

        public void setState(int state)
      • setRoaming

        public void setRoaming(boolean roaming)
      • setEmergencyOnly

        public void setEmergencyOnly(boolean emergencyOnly)
      • setCdmaRoamingIndicator

        public void setCdmaRoamingIndicator(int roaming)
      • setCdmaDefaultRoamingIndicator

        public void setCdmaDefaultRoamingIndicator(int roaming)
      • setCdmaEriIconIndex

        public void setCdmaEriIconIndex(int index)
      • setCdmaEriIconMode

        public void setCdmaEriIconMode(int mode)
      • setOperatorName

        public void setOperatorName(String longName,
                           String shortName,
                           String numeric)
      • setOperatorAlphaLong

        public void setOperatorAlphaLong(String longName)
        In CDMA, mOperatorAlphaLong can be set from the ERI text. This is done from the CDMAPhone and not from the CdmaServiceStateTracker.
      • setIsManualSelection

        public void setIsManualSelection(boolean isManual)
      • fillInNotifierBundle

        public void fillInNotifierBundle(Bundle m)
        Set intent notifier Bundle based on service state.
        Parameters:
        m - intent notifier Bundle
      • setRadioTechnology

        public void setRadioTechnology(int state)
      • setCssIndicator

        public void setCssIndicator(int css)
      • setSystemAndNetworkId

        public void setSystemAndNetworkId(int systemId,
                                 int networkId)
      • getRilRadioTechnology

        public int getRilRadioTechnology()
      • getRadioTechnology

        public int getRadioTechnology()
      • getNetworkType

        public int getNetworkType()
      • getCssIndicator

        public int getCssIndicator()
      • getNetworkId

        public int getNetworkId()
      • getSystemId

        public int getSystemId()
      • isGsm

        public static boolean isGsm(int radioTechnology)
      • isCdma

        public static boolean isCdma(int radioTechnology)


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 476 / 158863509. Delta: 0.05126 с