public class WapPushOverSms extends Object implements ServiceConnection
Constructor and Description |
---|
WapPushOverSms(Context context) |
Modifier and Type | Method and Description |
---|---|
int |
dispatchWapPdu(byte[] pdu,
BroadcastReceiver receiver,
InboundSmsHandler handler)
Dispatches inbound messages that are in the WAP PDU format.
|
void |
dispose() |
static int |
getAppOpsPermissionForIntent(String mimeType) |
static String |
getPermissionForType(String mimeType) |
boolean |
isWapPushForMms(byte[] pdu,
InboundSmsHandler handler)
Check whether the pdu is a MMS WAP push pdu that should be dispatched to the SMS app.
|
void |
onServiceConnected(ComponentName name,
IBinder service)
Called when a connection to the Service has been established, with
the
IBinder of the communication channel to the
Service. |
void |
onServiceDisconnected(ComponentName name)
Called when a connection to the Service has been lost.
|
public WapPushOverSms(Context context)
public void onServiceConnected(ComponentName name, IBinder service)
ServiceConnection
IBinder
of the communication channel to the
Service.onServiceConnected
in interface ServiceConnection
name
- The concrete component name of the service that has
been connected.service
- The IBinder of the Service's communication channel,
which you can now make calls on.public void onServiceDisconnected(ComponentName name)
ServiceConnection
ServiceConnection.onServiceConnected(android.content.ComponentName, android.os.IBinder)
when the Service is next running.onServiceDisconnected
in interface ServiceConnection
name
- The concrete component name of the service whose
connection has been lost.public void dispose()
public int dispatchWapPdu(byte[] pdu, BroadcastReceiver receiver, InboundSmsHandler handler)
pdu
- The WAP PDU, made up of one or more SMS PDUsTelephony.Sms.Intents
, or
Activity.RESULT_OK
if the message has been broadcast
to applicationspublic boolean isWapPushForMms(byte[] pdu, InboundSmsHandler handler)
public static int getAppOpsPermissionForIntent(String mimeType)