Udostępnij za pośrednictwem


SmsMessage.CreateFromPdu Method

Definition

Overloads

CreateFromPdu(Byte[])

Create an SmsMessage from a raw PDU.

CreateFromPdu(Byte[], String)

Create an SmsMessage from a raw PDU with the specified message format.

CreateFromPdu(Byte[])

Create an SmsMessage from a raw PDU.

[Android.Runtime.Register("createFromPdu", "([B)Landroid/telephony/SmsMessage;", "")]
public static Android.Telephony.SmsMessage? CreateFromPdu (byte[]? pdu);
[<Android.Runtime.Register("createFromPdu", "([B)Landroid/telephony/SmsMessage;", "")>]
static member CreateFromPdu : byte[] -> Android.Telephony.SmsMessage

Parameters

pdu
Byte[]

Returns

Attributes

Remarks

Create an SmsMessage from a raw PDU. Guess format based on Voice technology first, if it fails use other format. All applications which handle incoming SMS messages by processing the SMS_RECEIVED_ACTION broadcast intent <b>must</b> now pass the new format String extra from the intent into the new method createFromPdu(byte[], String) which takes an extra format parameter. This is required in order to correctly decode the PDU on devices that require support for both 3GPP and 3GPP2 formats at the same time, such as dual-mode GSM/CDMA and CDMA/LTE phones.

This member is deprecated. Use #createFromPdu(byte[], String) instead.

Java documentation for android.telephony.SmsMessage.createFromPdu(byte[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

CreateFromPdu(Byte[], String)

Create an SmsMessage from a raw PDU with the specified message format.

[Android.Runtime.Register("createFromPdu", "([BLjava/lang/String;)Landroid/telephony/SmsMessage;", "", ApiSince=23)]
public static Android.Telephony.SmsMessage? CreateFromPdu (byte[]? pdu, string? format);
[<Android.Runtime.Register("createFromPdu", "([BLjava/lang/String;)Landroid/telephony/SmsMessage;", "", ApiSince=23)>]
static member CreateFromPdu : byte[] * string -> Android.Telephony.SmsMessage

Parameters

pdu
Byte[]

the message PDU from the android.provider.Telephony.Sms.Intents#SMS_RECEIVED_ACTION intent

format
String

the format extra from the android.provider.Telephony.Sms.Intents#SMS_RECEIVED_ACTION intent

Returns

Attributes

Remarks

Create an SmsMessage from a raw PDU with the specified message format. The message format is passed in the android.provider.Telephony.Sms.Intents#SMS_RECEIVED_ACTION as the format String extra, and will be either "3gpp" for GSM/UMTS/LTE messages in 3GPP format or "3gpp2" for CDMA/LTE messages in 3GPP2 format.

Java documentation for android.telephony.SmsMessage.createFromPdu(byte[], java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to