StkCmdReceiverpublic class StkCmdReceiver extends android.content.BroadcastReceiver Receiver class to get STK intents, broadcasted by telephony layer. |
Methods Summary |
---|
private void | handleCommandMessage(android.content.Context context, android.content.Intent intent)
Bundle args = new Bundle();
args.putInt(StkAppService.OPCODE, StkAppService.OP_CMD);
args.putParcelable(StkAppService.CMD_MSG, intent
.getParcelableExtra("STK CMD"));
context.startService(new Intent(context, StkAppService.class)
.putExtras(args));
| private void | handleSessionEnd(android.content.Context context, android.content.Intent intent)
Bundle args = new Bundle();
args.putInt(StkAppService.OPCODE, StkAppService.OP_END_SESSION);
context.startService(new Intent(context, StkAppService.class)
.putExtras(args));
| public void | onReceive(android.content.Context context, android.content.Intent intent)
String action = intent.getAction();
if (action.equals(AppInterface.STK_CMD_ACTION)) {
handleCommandMessage(context, intent);
} else if (action.equals(AppInterface.STK_SESSION_END_ACTION)) {
handleSessionEnd(context, intent);
}
|
|