IT. Expert System.

Android Reference

CellBroadcastMessage


android.telephony

Class CellBroadcastMessage

  • All Implemented Interfaces:
    Parcelable


    public class CellBroadcastMessage
    extends Object
    implements Parcelable
    Application wrapper for SmsCbMessage. This is Parcelable so that decoded broadcast message objects can be passed between running Services. New broadcasts are received by the CellBroadcastReceiver app, which exports the database of previously received broadcasts at "content://cellbroadcasts/". The "android.permission.READ_CELL_BROADCASTS" permission is required to read from the ContentProvider, and writes to the database are not allowed.

    Use createFromCursor(android.database.Cursor) to create CellBroadcastMessage objects from rows in the database cursor returned by the ContentProvider.

    • Constructor Detail

      • CellBroadcastMessage

        public CellBroadcastMessage(SmsCbMessage message)
    • Method Detail

      • describeContents

        public int describeContents()
        Parcelable: no special flags.
        Specified by:
        describeContents in interface Parcelable
        Returns:
        a bitmask indicating the set of special object types marshalled by the Parcelable.
      • createFromCursor

        public static CellBroadcastMessage createFromCursor(Cursor cursor)
        Create a CellBroadcastMessage from a row in the database.
        Parameters:
        cursor - an open SQLite cursor pointing to the row to read
        Returns:
        the new CellBroadcastMessage
        Throws:
        IllegalArgumentException - if one of the required columns is missing
      • getContentValues

        public ContentValues getContentValues()
        Return a ContentValues object for insertion into the database.
        Returns:
        a new ContentValues object containing this object's data
      • setIsRead

        public void setIsRead(boolean isRead)
        Set or clear the "read message" flag.
        Parameters:
        isRead - true if the message has been read; false if not
      • getLanguageCode

        public String getLanguageCode()
      • getServiceCategory

        public int getServiceCategory()
      • getDeliveryTime

        public long getDeliveryTime()
      • getMessageBody

        public String getMessageBody()
      • isRead

        public boolean isRead()
      • getSerialNumber

        public int getSerialNumber()
      • isPublicAlertMessage

        public boolean isPublicAlertMessage()
        Return whether the broadcast is an emergency (PWS) message type. This includes lower priority test messages and Amber alerts. All public alerts show the flashing warning icon in the dialog, but only emergency alerts play the alert sound and speak the message.
        Returns:
        true if the message is PWS type; false otherwise
      • isEmergencyAlertMessage

        public boolean isEmergencyAlertMessage()
        Returns whether the broadcast is an emergency (PWS) message type, including test messages, but excluding lower priority Amber alert broadcasts.
        Returns:
        true if the message is PWS type, excluding Amber alerts
      • isEtwsMessage

        public boolean isEtwsMessage()
        Return whether the broadcast is an ETWS emergency message type.
        Returns:
        true if the message is ETWS emergency type; false otherwise
      • isCmasMessage

        public boolean isCmasMessage()
        Return whether the broadcast is a CMAS emergency message type.
        Returns:
        true if the message is CMAS emergency type; false otherwise
      • isEtwsPopupAlert

        public boolean isEtwsPopupAlert()
        Return whether the broadcast is an ETWS popup alert. This method checks the message ID and the message code.
        Returns:
        true if the message indicates an ETWS popup alert
      • isEtwsEmergencyUserAlert

        public boolean isEtwsEmergencyUserAlert()
        Return whether the broadcast is an ETWS emergency user alert. This method checks the message ID and the message code.
        Returns:
        true if the message indicates an ETWS emergency user alert
      • isEtwsTestMessage

        public boolean isEtwsTestMessage()
        Return whether the broadcast is an ETWS test message.
        Returns:
        true if the message is an ETWS test message; false otherwise
      • getDateString

        public String getDateString(Context context)
        Return the abbreviated date string for the message delivery time.
        Parameters:
        context - the context object
        Returns:
        a String to use in the broadcast list UI
      • getSpokenDateString

        public String getSpokenDateString(Context context)
        Return the date string for the message delivery time, suitable for text-to-speech.
        Parameters:
        context - the context object
        Returns:
        a String for populating the list item AccessibilityEvent for TTS


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: 409 / . Delta: 0.03030 с