Telephony.Sms.Intents
public
static
final
class
Telephony.Sms.Intents
extends Object
| java.lang.Object | |
| ↳ | android.provider.Telephony.Sms.Intents |
Contains constants for SMS related Intents that are broadcast.
Summary
Constants | |
|---|---|
String |
ACTION_CHANGE_DEFAULT
Activity action: Ask the user to change the default SMS application. |
String |
ACTION_DEFAULT_SMS_PACKAGE_CHANGED
Broadcast action: When the default SMS package changes, the previous default SMS package and the new default SMS package are sent this broadcast to notify them of the change. |
String |
ACTION_EXTERNAL_PROVIDER_CHANGE
Broadcast action: When a change is made to the SmsProvider or MmsProvider by a process other than the default SMS application, this intent is broadcast to the default SMS application so it can re-sync or update the change. |
String |
DATA_SMS_RECEIVED_ACTION
Broadcast Action: A new data based SMS message has been received by the device. |
String |
EXTRA_IS_DEFAULT_SMS_APP
The IsDefaultSmsApp boolean passed as an
extra for |
String |
EXTRA_PACKAGE_NAME
The PackageName string passed in as an
extra for |
int |
RESULT_SMS_DUPLICATED
Set by BroadcastReceiver to indicate a duplicate incoming message. |
int |
RESULT_SMS_GENERIC_ERROR
Set by BroadcastReceiver to indicate a generic error while processing the message. |
int |
RESULT_SMS_HANDLED
Set by BroadcastReceiver to indicate that the message was handled successfully. |
int |
RESULT_SMS_OUT_OF_MEMORY
Set by BroadcastReceiver to indicate insufficient memory to store the message. |
int |
RESULT_SMS_UNSUPPORTED
Set by BroadcastReceiver to indicate that the message, while possibly valid, is of a format or encoding that is not supported. |
String |
SIM_FULL_ACTION
Broadcast Action: The SIM storage for SMS messages is full. |
String |
SMS_CB_RECEIVED_ACTION
Broadcast Action: A new Cell Broadcast message has been received by the device. |
String |
SMS_DELIVER_ACTION
Broadcast Action: A new text-based SMS message has been received by the device. |
String |
SMS_RECEIVED_ACTION
Broadcast Action: A new text-based SMS message has been received by the device. |
String |
SMS_REJECTED_ACTION
Broadcast Action: An incoming SMS has been rejected by the telephony framework. |
String |
SMS_SERVICE_CATEGORY_PROGRAM_DATA_RECEIVED_ACTION
Broadcast Action: A new CDMA SMS has been received containing Service Category Program Data (updates the list of enabled broadcast channels). |
String |
WAP_PUSH_DELIVER_ACTION
Broadcast Action: A new WAP PUSH message has been received by the device. |
String |
WAP_PUSH_RECEIVED_ACTION
Broadcast Action: A new WAP PUSH message has been received by the device. |
Public methods | |
|---|---|
static
SmsMessage[]
|
getMessagesFromIntent(Intent intent)
Read the PDUs out of an |
Inherited methods | |
|---|---|
From
class
java.lang.Object
| |
Constants
ACTION_CHANGE_DEFAULT
String ACTION_CHANGE_DEFAULT
Activity action: Ask the user to change the default
SMS application. This will show a dialog that asks the
user whether they want to replace the current default
SMS application with the one specified in
EXTRA_PACKAGE_NAME.
Constant Value: "android.provider.Telephony.ACTION_CHANGE_DEFAULT"
ACTION_DEFAULT_SMS_PACKAGE_CHANGED
String ACTION_DEFAULT_SMS_PACKAGE_CHANGED
Broadcast action: When the default SMS package changes,
the previous default SMS package and the new default SMS
package are sent this broadcast to notify them of the change.
A boolean is specified in EXTRA_IS_DEFAULT_SMS_APP to
indicate whether the package is the new default SMS package.
Constant Value: "android.provider.action.DEFAULT_SMS_PACKAGE_CHANGED"
ACTION_EXTERNAL_PROVIDER_CHANGE
String ACTION_EXTERNAL_PROVIDER_CHANGE
Broadcast action: When a change is made to the SmsProvider or MmsProvider by a process other than the default SMS application, this intent is broadcast to the default SMS application so it can re-sync or update the change. The uri that was used to call the provider can be retrieved from the intent with getData(). The actual affected uris (which would depend on the selection specified) are not included.
Constant Value: "android.provider.action.EXTERNAL_PROVIDER_CHANGE"
DATA_SMS_RECEIVED_ACTION
String DATA_SMS_RECEIVED_ACTION
Broadcast Action: A new data based SMS message has been received by the device. This intent will be delivered to all registered receivers as a notification. The intent will have the following extra values:
- "pdus" - An Object[] of byte[]s containing the PDUs that make up the message.
The extra values can be extracted using
getMessagesFromIntent(Intent).
If a BroadcastReceiver encounters an error while processing this intent it should set the result code appropriately.
Requires RECEIVE_SMS to receive.
Constant Value: "android.intent.action.DATA_SMS_RECEIVED"
EXTRA_IS_DEFAULT_SMS_APP
String EXTRA_IS_DEFAULT_SMS_APP
The IsDefaultSmsApp boolean passed as an
extra for ACTION_DEFAULT_SMS_PACKAGE_CHANGED to indicate whether the
SMS app is becoming the default SMS app or is no longer the default.
See also:
Constant Value: "android.provider.extra.IS_DEFAULT_SMS_APP"
EXTRA_PACKAGE_NAME
String EXTRA_PACKAGE_NAME
The PackageName string passed in as an
extra for ACTION_CHANGE_DEFAULT
See also:
Constant Value: "package"
RESULT_SMS_DUPLICATED
int RESULT_SMS_DUPLICATED
Set by BroadcastReceiver to indicate a duplicate incoming message.
Constant Value: 5 (0x00000005)
RESULT_SMS_GENERIC_ERROR
int RESULT_SMS_GENERIC_ERROR
Set by BroadcastReceiver to indicate a generic error while processing the message.
Constant Value: 2 (0x00000002)
RESULT_SMS_HANDLED
int RESULT_SMS_HANDLED
Set by BroadcastReceiver to indicate that the message was handled successfully.
Constant Value: 1 (0x00000001)
RESULT_SMS_OUT_OF_MEMORY
int RESULT_SMS_OUT_OF_MEMORY
Set by BroadcastReceiver to indicate insufficient memory to store the message.
Constant Value: 3 (0x00000003)
RESULT_SMS_UNSUPPORTED
int RESULT_SMS_UNSUPPORTED
Set by BroadcastReceiver to indicate that the message, while possibly valid, is of a format or encoding that is not supported.
Constant Value: 4 (0x00000004)
SIM_FULL_ACTION
String SIM_FULL_ACTION
Broadcast Action: The SIM storage for SMS messages is full. If space is not freed, messages targeted for the SIM (class 2) may not be saved.
Requires RECEIVE_SMS to receive.
Constant Value: "android.provider.Telephony.SIM_FULL"
SMS_CB_RECEIVED_ACTION
String SMS_CB_RECEIVED_ACTION
Broadcast Action: A new Cell Broadcast message has been received by the device. The intent will have the following extra values:
- "message" - An SmsCbMessage object containing the broadcast message data. This is not an emergency alert, so ETWS and CMAS data will be null.
The extra values can be extracted using
getMessagesFromIntent(Intent).
If a BroadcastReceiver encounters an error while processing this intent it should set the result code appropriately.
Requires RECEIVE_SMS to receive.
Constant Value: "android.provider.Telephony.SMS_CB_RECEIVED"
SMS_DELIVER_ACTION
String SMS_DELIVER_ACTION
Broadcast Action: A new text-based SMS message has been received by the device. This intent will only be delivered to the default sms app. That app is responsible for writing the message and notifying the user. The intent will have the following extra values:
- "pdus" - An Object[] of byte[]s containing the PDUs that make up the message.
- "format" - A String describing the format of the PDUs. It can be either "3gpp" or "3gpp2".
- "subscription" - An optional long value of the subscription id which received the message.
- "slot" - An optional int value of the SIM slot containing the subscription.
- "phone" - An optional int value of the phone id associated with the subscription.
- "errorCode" - An optional int error code associated with receiving the message.
The extra values can be extracted using
getMessagesFromIntent(Intent).
If a BroadcastReceiver encounters an error while processing this intent it should set the result code appropriately.
Note:
The broadcast receiver that filters for this intent must declare
BROADCAST_SMS as a required permission in
the <receiver> tag.
Requires RECEIVE_SMS to receive.
Constant Value: "android.provider.Telephony.SMS_DELIVER"
SMS_RECEIVED_ACTION
String SMS_RECEIVED_ACTION
Broadcast Action: A new text-based SMS message has been received by the device. This intent will be delivered to all registered receivers as a notification. These apps are not expected to write the message or notify the user. The intent will have the following extra values:
- "pdus" - An Object[] of byte[]s containing the PDUs that make up the message.
The extra values can be extracted using
getMessagesFromIntent(Intent).
If a BroadcastReceiver encounters an error while processing this intent it should set the result code appropriately.
Requires RECEIVE_SMS to receive.
Constant Value: "android.provider.Telephony.SMS_RECEIVED"
SMS_REJECTED_ACTION
String SMS_REJECTED_ACTION
Broadcast Action: An incoming SMS has been rejected by the telephony framework. This intent is sent in lieu of any of the RECEIVED_ACTION intents. The intent will have the following extra value:
- "result" - An int result code, e.g.
RESULT_SMS_OUT_OF_MEMORYindicating the error returned to the network.
Requires RECEIVE_SMS to receive.
Constant Value: "android.provider.Telephony.SMS_REJECTED"
SMS_SERVICE_CATEGORY_PROGRAM_DATA_RECEIVED_ACTION
String SMS_SERVICE_CATEGORY_PROGRAM_DATA_RECEIVED_ACTION
Broadcast Action: A new CDMA SMS has been received containing Service Category Program Data (updates the list of enabled broadcast channels). The intent will have the following extra values:
- "operations" - An array of CdmaSmsCbProgramData objects containing the service category operations (add/delete/clear) to perform.
The extra values can be extracted using
getMessagesFromIntent(Intent).
If a BroadcastReceiver encounters an error while processing this intent it should set the result code appropriately.
Requires RECEIVE_SMS to receive.
Constant Value: "android.provider.Telephony.SMS_SERVICE_CATEGORY_PROGRAM_DATA_RECEIVED"
WAP_PUSH_DELIVER_ACTION
String WAP_PUSH_DELIVER_ACTION
Broadcast Action: A new WAP PUSH message has been received by the device. This intent will only be delivered to the default sms app. That app is responsible for writing the message and notifying the user. The intent will have the following extra values:
- "transactionId" - (Integer) The WAP transaction ID
- "pduType" - (Integer) The WAP PDU type
- "header" - (byte[]) The header of the message
- "data" - (byte[]) The data payload of the message
- "contentTypeParameters" -(HashMap<String,String>) Any parameters associated with the content type (decoded from the WSP Content-Type header)
- "subscription" - An optional long value of the subscription id which received the message.
- "slot" - An optional int value of the SIM slot containing the subscription.
- "phone" - An optional int value of the phone id associated with the subscription.
If a BroadcastReceiver encounters an error while processing this intent it should set the result code appropriately.
The contentTypeParameters extra value is map of content parameters keyed by their names.
If any unassigned well-known parameters are encountered, the key of the map will be 'unassigned/0x...', where '...' is the hex value of the unassigned parameter. If a parameter has No-Value the value in the map will be null.
Requires RECEIVE_MMS or
RECEIVE_WAP_PUSH (depending on WAP PUSH type) to
receive.
Note:
The broadcast receiver that filters for this intent must declare
BROADCAST_WAP_PUSH as a required permission in
the <receiver> tag.
Constant Value: "android.provider.Telephony.WAP_PUSH_DELIVER"
WAP_PUSH_RECEIVED_ACTION
String WAP_PUSH_RECEIVED_ACTION
Broadcast Action: A new WAP PUSH message has been received by the device. This intent will be delivered to all registered receivers as a notification. These apps are not expected to write the message or notify the user. The intent will have the following extra values:
- "transactionId" - (Integer) The WAP transaction ID
- "pduType" - (Integer) The WAP PDU type
- "header" - (byte[]) The header of the message
- "data" - (byte[]) The data payload of the message
- "contentTypeParameters" - (HashMap<String,String>) Any parameters associated with the content type (decoded from the WSP Content-Type header)
If a BroadcastReceiver encounters an error while processing this intent it should set the result code appropriately.
The contentTypeParameters extra value is map of content parameters keyed by their names.
If any unassigned well-known parameters are encountered, the key of the map will be 'unassigned/0x...', where '...' is the hex value of the unassigned parameter. If a parameter has No-Value the value in the map will be null.
Requires RECEIVE_MMS or
RECEIVE_WAP_PUSH (depending on WAP PUSH type) to
receive.
Constant Value: "android.provider.Telephony.WAP_PUSH_RECEIVED"
Public methods
getMessagesFromIntent
SmsMessage[] getMessagesFromIntent (Intent intent)
Read the PDUs out of an SMS_RECEIVED_ACTION or a
DATA_SMS_RECEIVED_ACTION intent.
| Parameters | |
|---|---|
intent |
Intent:
the intent to read from |
| Returns | |
|---|---|
SmsMessage[] |
an array of SmsMessages for the PDUs |
Interfaces
- BaseColumns
- CalendarContract.AttendeesColumns
- CalendarContract.CalendarAlertsColumns
- CalendarContract.CalendarCacheColumns
- CalendarContract.CalendarColumns
- CalendarContract.CalendarSyncColumns
- CalendarContract.ColorsColumns
- CalendarContract.EventDaysColumns
- CalendarContract.EventsColumns
- CalendarContract.ExtendedPropertiesColumns
- CalendarContract.RemindersColumns
- CalendarContract.SyncColumns
- Contacts.ContactMethodsColumns
- Contacts.ExtensionsColumns
- Contacts.GroupsColumns
- Contacts.OrganizationColumns
- Contacts.PeopleColumns
- Contacts.PhonesColumns
- Contacts.PhotosColumns
- Contacts.PresenceColumns
- Contacts.SettingsColumns
- ContactsContract.BaseSyncColumns
- ContactsContract.CommonDataKinds.BaseTypes
- ContactsContract.CommonDataKinds.CommonColumns
- ContactsContract.ContactNameColumns
- ContactsContract.ContactOptionsColumns
- ContactsContract.ContactsColumns
- ContactsContract.ContactStatusColumns
- ContactsContract.DataColumns
- ContactsContract.DataColumnsWithJoins
- ContactsContract.DataUsageStatColumns
- ContactsContract.DeletedContactsColumns
- ContactsContract.DisplayNameSources
- ContactsContract.FullNameStyle
- ContactsContract.GroupsColumns
- ContactsContract.PhoneLookupColumns
- ContactsContract.PhoneticNameStyle
- ContactsContract.PresenceColumns
- ContactsContract.RawContactsColumns
- ContactsContract.SettingsColumns
- ContactsContract.StatusColumns
- ContactsContract.SyncColumns
- MediaStore.Audio.AlbumColumns
- MediaStore.Audio.ArtistColumns
- MediaStore.Audio.AudioColumns
- MediaStore.Audio.GenresColumns
- MediaStore.Audio.PlaylistsColumns
- MediaStore.Files.FileColumns
- MediaStore.Images.ImageColumns
- MediaStore.MediaColumns
- MediaStore.Video.VideoColumns
- OpenableColumns
- SyncStateContract.Columns
- Telephony.BaseMmsColumns
- Telephony.CanonicalAddressesColumns
- Telephony.TextBasedSmsColumns
- Telephony.ThreadsColumns
Classes
- AlarmClock
- BlockedNumberContract
- BlockedNumberContract.BlockedNumbers
- Browser
- CalendarContract
- CalendarContract.Attendees
- CalendarContract.CalendarAlerts
- CalendarContract.CalendarCache
- CalendarContract.CalendarEntity
- CalendarContract.Calendars
- CalendarContract.Colors
- CalendarContract.EventDays
- CalendarContract.Events
- CalendarContract.EventsEntity
- CalendarContract.ExtendedProperties
- CalendarContract.Instances
- CalendarContract.Reminders
- CalendarContract.SyncState
- CallLog
- CallLog.Calls
- Contacts
- Contacts.ContactMethods
- Contacts.Extensions
- Contacts.GroupMembership
- Contacts.Groups
- Contacts.Intents
- Contacts.Intents.Insert
- Contacts.Intents.UI
- Contacts.Organizations
- Contacts.People
- Contacts.People.ContactMethods
- Contacts.People.Extensions
- Contacts.People.Phones
- Contacts.Phones
- Contacts.Photos
- Contacts.Settings
- ContactsContract
- ContactsContract.AggregationExceptions
- ContactsContract.CommonDataKinds
- ContactsContract.CommonDataKinds.Callable
- ContactsContract.CommonDataKinds.Contactables
- ContactsContract.CommonDataKinds.Email
- ContactsContract.CommonDataKinds.Event
- ContactsContract.CommonDataKinds.GroupMembership
- ContactsContract.CommonDataKinds.Identity
- ContactsContract.CommonDataKinds.Im
- ContactsContract.CommonDataKinds.Nickname
- ContactsContract.CommonDataKinds.Note
- ContactsContract.CommonDataKinds.Organization
- ContactsContract.CommonDataKinds.Phone
- ContactsContract.CommonDataKinds.Photo
- ContactsContract.CommonDataKinds.Relation
- ContactsContract.CommonDataKinds.SipAddress
- ContactsContract.CommonDataKinds.StructuredName
- ContactsContract.CommonDataKinds.StructuredPostal
- ContactsContract.CommonDataKinds.Website
- ContactsContract.Contacts
- ContactsContract.Contacts.AggregationSuggestions
- ContactsContract.Contacts.AggregationSuggestions.Builder
- ContactsContract.Contacts.Data
- ContactsContract.Contacts.Entity
- ContactsContract.Contacts.Photo
- ContactsContract.Data
- ContactsContract.DataUsageFeedback
- ContactsContract.DeletedContacts
- ContactsContract.Directory
- ContactsContract.DisplayPhoto
- ContactsContract.Groups
- ContactsContract.Intents
- ContactsContract.Intents.Insert
- ContactsContract.PhoneLookup
- ContactsContract.PinnedPositions
- ContactsContract.Presence
- ContactsContract.Profile
- ContactsContract.ProfileSyncState
- ContactsContract.ProviderStatus
- ContactsContract.QuickContact
- ContactsContract.RawContacts
- ContactsContract.RawContacts.Data
- ContactsContract.RawContacts.DisplayPhoto
- ContactsContract.RawContacts.Entity
- ContactsContract.RawContactsEntity
- ContactsContract.SearchSnippets
- ContactsContract.Settings
- ContactsContract.StatusUpdates
- ContactsContract.SyncState
- DocumentsContract
- DocumentsContract.Document
- DocumentsContract.Root
- DocumentsProvider
- LiveFolders
- MediaStore
- MediaStore.Audio
- MediaStore.Audio.Albums
- MediaStore.Audio.Artists
- MediaStore.Audio.Artists.Albums
- MediaStore.Audio.Genres
- MediaStore.Audio.Genres.Members
- MediaStore.Audio.Media
- MediaStore.Audio.Playlists
- MediaStore.Audio.Playlists.Members
- MediaStore.Audio.Radio
- MediaStore.Files
- MediaStore.Images
- MediaStore.Images.Media
- MediaStore.Images.Thumbnails
- MediaStore.Video
- MediaStore.Video.Media
- MediaStore.Video.Thumbnails
- SearchRecentSuggestions
- Settings
- Settings.Global
- Settings.NameValueTable
- Settings.Secure
- Settings.System
- SyncStateContract
- SyncStateContract.Constants
- SyncStateContract.Helpers
- Telephony
- Telephony.Carriers
- Telephony.Mms
- Telephony.Mms.Addr
- Telephony.Mms.Draft
- Telephony.Mms.Inbox
- Telephony.Mms.Intents
- Telephony.Mms.Outbox
- Telephony.Mms.Part
- Telephony.Mms.Rate
- Telephony.Mms.Sent
- Telephony.MmsSms
- Telephony.MmsSms.PendingMessages
- Telephony.Sms
- Telephony.Sms.Conversations
- Telephony.Sms.Draft
- Telephony.Sms.Inbox
- Telephony.Sms.Intents
- Telephony.Sms.Outbox
- Telephony.Sms.Sent
- Telephony.Threads
- UserDictionary
- UserDictionary.Words
- VoicemailContract
- VoicemailContract.Status
- VoicemailContract.Voicemails
Exceptions


