net.rim.device.api.io.nfc.se
Class SecureElement
java.lang.Object
net.rim.device.api.io.nfc.se.SecureElement
public class SecureElement
- extends Object
Represents a secure element on the device. The secure element can be either
embedded or SIM-based.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.0.0
|
Field Summary |
|
static int |
BATTERY_OFF_MODE
Constant to indicate a battery off setting. |
|
static int |
BATTERY_ON_MODE
Constant to indicate a battery on setting. |
|
static int |
EMBEDDED
Constant to indicate an embedded secure element. |
|
static int |
SIM
Constant to indicate a SIM-based secure element. |
BATTERY_OFF_MODE
public static final int BATTERY_OFF_MODE
- Constant to indicate a battery off setting.
- See Also:
- Constant Field Values
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.0.0
BATTERY_ON_MODE
public static final int BATTERY_ON_MODE
- Constant to indicate a battery on setting.
- See Also:
- Constant Field Values
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.0.0
SIM
public static final int SIM
- Constant to indicate a SIM-based secure element.
- See Also:
- Constant Field Values
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.0.0
EMBEDDED
public static final int EMBEDDED
- Constant to indicate an embedded secure element.
- See Also:
- Constant Field Values
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.0.0
getUri
public String getUri()
- Returns a URI that can be used to open an
APDUConnection to the
secure element.
- Returns:
- A URI for an
APDUConnection to the secure element. - Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.0.0
getUri
public String getUri(byte[] aid)
- Returns a URI that can be used to open an
APDUConnection to a
specific application on a secure element.
- Parameters:
aid - The ID of the application.
- Returns:
- A URI for an
APDUConnection to the application on
the secure element. - Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.0.0
getType
public int getType()
- Returns the secure element type.
- Returns:
SecureElement.SIM or
SecureElement.EMBEDDED.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.0.0
getTechnologyTypes
public int getTechnologyTypes(int batteryMode)
throws NFCException
- Returns the technology types that the secure element is
using for card emulation.
- Parameters:
batteryMode - The battery mode that the technology types apply to. Can be either
BATTERY_ON or BATTERY_OFF
- Returns:
- The
TechnologyTypes used by the secure element.
- Throws:
IllegalArgumentException - If the batteryMode parameter is not valid
NFCException - If the currently supported technology types cannot
be returned- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.0.0
setTechnologyTypes
public void setTechnologyTypes(int batteryMode,
int technologyTypes)
throws NFCException
- Sets the technology types that this card should use for card emulation. Separate
settings can be configured for battery on and battery off scenarios.
- Parameters:
batteryMode - The battery mode that the technology types apply to. Can be either
BATTERY_ON or BATTERY_OFFtechnologyTypes - The TechnologyType that this secure element may use when
doing card emulation.
- Throws:
IllegalArgumentException - If technologyTypes is not
in the valid range, or the batteryMode parameter is invalid
NFCException - When the technology types cannot be set.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.0.0
addTransactionListener
public void addTransactionListener(TransactionListener listener)
throws NFCException
- Registers a listener to receive transaction notifications. The listener
is triggered when an external reader accesses an application stored on
the secure element.
Note that MIDlets can alternatively add a PushRegistry entry in order to be launched when a particular
AID is selected over the RF interface. The entry must be in the form of a JSR-177 connection string.
For example, an appropriate PushRegistry entry to listen for selection events on the SIM for the AID a0.00.00.00.03.00.00.00
would be "apdu:0;target=a0.00.00.00.03.00.00.00".
- Parameters:
listener - The TransactionListener object to receive
transaction notifications.
- Throws:
NFCException - When the listener cannot be registered.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.0.0
removeTransactionListener
public void removeTransactionListener(TransactionListener listener)
throws NFCException
- Unregisters a
TransactionListener object.
- Parameters:
listener - The TransactionListener to unregister.
- Throws:
NFCException - If the listener cannot be removed.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.0.0
addTechnologyTypesChangeListener
public void addTechnologyTypesChangeListener(TechnologyTypesChangeListener listener)
throws NFCException
- Registers a listener to receive technology type routing change notifications. The
listener is triggered when the routing configuration for this secure element changes.
- Parameters:
listener - The TechnologyTypesChangeListener object to receive
technology type change notifications.
- Throws:
NFCException - When the listener cannot be registered.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.0.0
removeTechnologyTypesChangeListener
public void removeTechnologyTypesChangeListener(TechnologyTypesChangeListener listener)
throws NFCException
- Unregisters a technology types change listener.
- Parameters:
listener - The TransactionListener to unregister.
- Throws:
NFCException - If the listener cannot be removed.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.0.0
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal