Share via


CarrierMessagingService.OnFilterSms Method

Definition

Override this method to filter inbound SMS messages.

[Android.Runtime.Register("onFilterSms", "(Landroid/service/carrier/MessagePdu;Ljava/lang/String;IILandroid/service/carrier/CarrierMessagingService$ResultCallback;)V", "GetOnFilterSms_Landroid_service_carrier_MessagePdu_Ljava_lang_String_IILandroid_service_carrier_CarrierMessagingService_ResultCallback_Handler", ApiSince=22)]
public virtual void OnFilterSms (Android.Service.Carrier.MessagePdu pdu, string format, int destPort, int subId, Android.Service.Carrier.CarrierMessagingService.IResultCallback callback);
[<Android.Runtime.Register("onFilterSms", "(Landroid/service/carrier/MessagePdu;Ljava/lang/String;IILandroid/service/carrier/CarrierMessagingService$ResultCallback;)V", "GetOnFilterSms_Landroid_service_carrier_MessagePdu_Ljava_lang_String_IILandroid_service_carrier_CarrierMessagingService_ResultCallback_Handler", ApiSince=22)>]
abstract member OnFilterSms : Android.Service.Carrier.MessagePdu * string * int * int * Android.Service.Carrier.CarrierMessagingService.IResultCallback -> unit
override this.OnFilterSms : 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 true to keep an inbound SMS message and deliver to SMS apps, and false to drop the message.

Attributes

Remarks

Java documentation for android.service.carrier.CarrierMessagingService.onFilterSms(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