Motorola maxx V6 manual Draft Subject to Change 88/201, APDUConnection Interface

Models: maxx V6

1 201
Download 201 pages 31.32 Kb
Page 88
Image 88

Java ME Developer Guide

Chapter 12 - JSR-177 Java ME Security and Trust Services API

A subset of the ￿￿￿￿￿￿￿￿￿ package. It supports the exception class

￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿, which is not included in the CLDC API or the MIDP API.

The ￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿ package. It includes the interface APDUConnection to support APDU exchanges.

APDUConnection Interface

This interface extends the ￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿ interface. It defines the APDU connection. MIDlets can use this connection to communicate with applica- tions on a smart card using APDU protocol. ISO 7816-4 defines the APDU protocol as an application-level protocol between a smart card and an application on the device. There are two types of APDU messages:

command APDUs - sent to the smart card by a MIDlet

response APDUs - messages received from the smart card

All APDUs is generated according to the ISO 7816-4 specification.

Opening an APDU Connection

An APDU connection is established between a MIDlet and an application on a smart card. It uses one dedicated logical channel for that connection. The implementation supports multiple APDU connections between the handset and a smart card. Addi- tionally it supports multiple APDU connections between a MIDlet and an application on a smart card (if multiple connections are supported by the application on a smart card).

A MIDlet uses method ￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿ to open an APDU connection. An APDU connection is created by passing a generic connection URI string with the smart card AID and, optionally, the slot in which the smart card is in- serted, to the ￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿ method. When the method ￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿ is called by a MIDlet, the im- plementation requests a new logical channel from the smart card, for the APDU con- nection, unless channel 0 is used. When method

￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿ is called by a MIDlet, and the logical

DRAFT - Subject to Change [88/201]

Page 88
Image 88
Motorola maxx V6 manual Draft Subject to Change 88/201, APDUConnection Interface