Sdílet prostřednictvím


SmsMessage Class

Definition

A Short Message Service message.

[Android.Runtime.Register("android/telephony/SmsMessage", DoNotGenerateAcw=true)]
public class SmsMessage : Java.Lang.Object
[<Android.Runtime.Register("android/telephony/SmsMessage", DoNotGenerateAcw=true)>]
type SmsMessage = class
    inherit Object
Inheritance
SmsMessage
Attributes

Remarks

A Short Message Service message.

Java documentation for android.telephony.SmsMessage.

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.

Constructors

SmsMessage(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Fields

EncodingKsc5601
Obsolete.

This value is not defined in global standard.

Format3gpp

Indicates a 3GPP format SMS message.

Format3gpp2

Indicates a 3GPP2 format SMS message.

MaxUserDataBytes

The maximum number of payload bytes per message

MaxUserDataBytesWithHeader

The maximum number of payload bytes per message if a user data header is present.

MaxUserDataSeptets

The maximum number of payload septets per message

MaxUserDataSeptetsWithHeader

The maximum number of payload septets per message if a user data header is present.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
DisplayMessageBody

Returns the message body, or email message body if this message was from an email gateway.

DisplayOriginatingAddress

Returns the originating address, or email from address if this message was from an email gateway.

EmailBody
EmailFrom
Handle

The handle to the underlying Android instance.

(Inherited from Object)
IndexOnIcc

Returns the record index of the message on the ICC (1-based index).

IndexOnSim
Obsolete.

Returns the record index of the message on the SIM (1-based index).

IsCphsMwiMessage

Returns true for CPHS MWI toggle message.

IsEmail

Returns true if message is an email.

IsMWIClearMessage

returns true if this message is a CPHS voicemail / message waiting indicator (MWI) clear message

IsMwiDontStore

returns true if this message is a "Message Waiting Indication Group: Discard Message" notification and should not be stored.

IsMWISetMessage

returns true if this message is a CPHS voicemail / message waiting indicator (MWI) set message

IsReplace

See TS 23.

IsReplyPathPresent

Returns true iff the TP-Reply-Path bit is set in this message.

IsStatusReportMessage

Return true iff the message is a SMS-STATUS-REPORT message.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
MessageBody

Returns the message body as a String, if it exists and is text based.

OriginatingAddress

Returns the originating address (sender) of this SMS message in String form or null if unavailable.

PeerReference (Inherited from Object)
ProtocolIdentifier

Get protocol identifier.

PseudoSubject

Unofficial convention of a subject line enclosed in parens empty string if not present

ServiceCenterAddress

Returns the address of the SMS service center that relayed this message or null if there is none.

Status

GSM: For an SMS-STATUS-REPORT message, this returns the status field from the status report.

StatusOnIcc

Returns the status of the message on the ICC (read, unread, sent, unsent).

StatusOnSim
Obsolete.

Returns the status of the message on the SIM (read, unread, sent, unsent).

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

TimestampMillis

Returns the service centre timestamp in currentTimeMillis() format

Methods

CalculateLength(ICharSequence, Boolean)

Calculates the number of SMS's required to encode the message body and the number of characters remaining until the next message.

CalculateLength(String, Boolean)

Calculates the number of SMS's required to encode the message body and the number of characters remaining until the next message, given the current encoding.

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
CreateFromPdu(Byte[], String)

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

CreateFromPdu(Byte[])

Create an SmsMessage from a raw PDU.

Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetMessageClass()

Returns the class of this message.

GetPdu()

Returns the raw PDU for the message.

GetSubmitPdu(String, String, Int16, Byte[], Boolean)

Gets an SMS-SUBMIT PDU for a destination address and a message.

GetSubmitPdu(String, String, String, Boolean)

Gets an SMS-SUBMIT PDU for a destination address and a message.

GetTPLayerLengthForPDU(String)

Get the TP-Layer-Length for the given SMS-SUBMIT PDU Basically, the length in bytes (not hex chars) less the SMSC header

GetUserData()

returns the user data section minus the user data header if one was present.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to