다음을 통해 공유


CarrierMessagingService.OnReceiveTextSms Method

Definition

Override this method to filter inbound SMS messages.

[Android.Runtime.Register("onReceiveTextSms", "(Landroid/service/carrier/MessagePdu;Ljava/lang/String;IILandroid/service/carrier/CarrierMessagingService$ResultCallback;)V", "GetOnReceiveTextSms_Landroid_service_carrier_MessagePdu_Ljava_lang_String_IILandroid_service_carrier_CarrierMessagingService_ResultCallback_Handler", ApiSince=24)]
public virtual void OnReceiveTextSms (Android.Service.Carrier.MessagePdu pdu, string format, int destPort, int subId, Android.Service.Carrier.CarrierMessagingService.IResultCallback callback);
[<Android.Runtime.Register("onReceiveTextSms", "(Landroid/service/carrier/MessagePdu;Ljava/lang/String;IILandroid/service/carrier/CarrierMessagingService$ResultCallback;)V", "GetOnReceiveTextSms_Landroid_service_carrier_MessagePdu_Ljava_lang_String_IILandroid_service_carrier_CarrierMessagingService_ResultCallback_Handler", ApiSince=24)>]
abstract member OnReceiveTextSms : Android.Service.Carrier.MessagePdu * string * int * int * Android.Service.Carrier.CarrierMessagingService.IResultCallback -> unit
override this.OnReceiveTextSms : Android.Service.Carrier.MessagePdu * string * int * int * Android.Service.Carrier.CarrierMessagingService.IResultCallback -> unit

Parameters

pdu
MessagePdu

the PDUs of the message

format
String

the format of the PDUs, typically "3gpp" or "3gpp2"

destPort
Int32

the destination port of a binary SMS, this will be -1 for text SMS

subId
Int32

SMS subscription ID of the SIM

callback
CarrierMessagingService.IResultCallback

result callback. Call with a bitmask integer to indicate how the incoming text SMS should be handled by the platform. Use #RECEIVE_OPTIONS_DROP and #RECEIVE_OPTIONS_SKIP_NOTIFY_WHEN_CREDENTIAL_PROTECTED_STORAGE_UNAVAILABLE to set the flags in the bitmask.

Attributes

Remarks

Java documentation for android.service.carrier.CarrierMessagingService.onReceiveTextSms(android.service.carrier.MessagePdu, java.lang.String, int, int, android.service.carrier.ResultCallback).

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