IT. Expert System.

Android Reference

SmsCbLocation


android.telephony

Class SmsCbLocation

  • All Implemented Interfaces:
    Parcelable


    public class SmsCbLocation
    extends Object
    implements Parcelable
    Represents the location and geographical scope of a cell broadcast message. For GSM/UMTS, the Location Area and Cell ID are set when the broadcast geographical scope is cell wide or Location Area wide. For CDMA, the broadcast geographical scope is always PLMN wide.
    • Constructor Detail

      • SmsCbLocation

        public SmsCbLocation()
        Construct an empty location object. This is used for some test cases, and for cell broadcasts saved in older versions of the database without location info.
      • SmsCbLocation

        public SmsCbLocation(String plmn)
        Construct a location object for the PLMN. This class is immutable, so the same object can be reused for multiple broadcasts.
      • SmsCbLocation

        public SmsCbLocation(String plmn,
                     int lac,
                     int cid)
        Construct a location object for the PLMN, LAC, and Cell ID. This class is immutable, so the same object can be reused for multiple broadcasts.
      • SmsCbLocation

        public SmsCbLocation(Parcel in)
        Initialize the object from a Parcel.
    • Method Detail

      • getPlmn

        public String getPlmn()
        Returns the MCC/MNC of the network as a String.
        Returns:
        the PLMN identifier (MCC+MNC) as a String
      • getLac

        public int getLac()
        Returns the GSM location area code, or UMTS service area code.
        Returns:
        location area code, -1 if unknown, 0xffff max legal value
      • getCid

        public int getCid()
        Returns the GSM or UMTS cell ID.
        Returns:
        gsm cell id, -1 if unknown, 0xffff max legal value
      • 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()
      • 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.
      • isInLocationArea

        public boolean isInLocationArea(SmsCbLocation area)
        Test whether this location is within the location area of the specified object.
        Parameters:
        area - the location area to compare with this location
        Returns:
        true if this location is contained within the specified location area
      • isInLocationArea

        public boolean isInLocationArea(String plmn,
                               int lac,
                               int cid)
        Test whether this location is within the location area of the CellLocation.
        Parameters:
        plmn - the PLMN to use for comparison
        lac - the Location Area (GSM) or Service Area (UMTS) to compare with
        cid - the Cell ID to compare with
        Returns:
        true if this location is contained within the specified PLMN, LAC, and Cell ID
      • writeToParcel

        public void writeToParcel(Parcel dest,
                         int flags)
        Flatten this object into a Parcel.
        Specified by:
        writeToParcel in interface Parcelable
        Parameters:
        dest - The Parcel in which the object should be written.
        flags - Additional flags about how the object should be written (ignored).
      • describeContents

        public int describeContents()
        Describe the kinds of special objects contained in the marshalled representation.
        Specified by:
        describeContents in interface Parcelable
        Returns:
        a bitmask indicating this Parcelable contains no special objects


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: 691 / 158857754. Delta: 0.03110 с