Search in sources :

Example 1 with NfcVirtTargListener

use of nfc.sample.virtual.target.NfcVirtTargListener in project Samples-for-Java by blackberry.

the class NfcVirtTargScreen method startEmulationOfISO14443ATarget.

protected void startEmulationOfISO14443ATarget() {
    Utilities.log("XXXX NfcVirtTarg About to start ISO14443-A virtual emulation");
    try {
        // note that the ID parameter is not actually used by the API
        _virtualISO14443ATarget = new VirtualISO14443Part4TypeATarget(new NfcVirtTargListener(this), Constants.MY_ISO_TARGET_ID, null);
        _virtualISO14443ATarget.startEmulation();
        Utilities.log("XXXX NfcVirtTarg ISO14443-A emulation started");
        _screen.logEvent("info:ISO14443-A emulation started");
    } catch (NFCException e) {
        e.printStackTrace();
        Utilities.log("XXXX NfcVirtTarg NFCException on starting ISO14443-A emulation");
        _screen.logEvent("info:Starting ISO 14443-A emulation failed");
    }
}
Also used : VirtualISO14443Part4TypeATarget(net.rim.device.api.io.nfc.emulation.VirtualISO14443Part4TypeATarget) NfcVirtTargListener(nfc.sample.virtual.target.NfcVirtTargListener) NFCException(net.rim.device.api.io.nfc.NFCException)

Aggregations

NFCException (net.rim.device.api.io.nfc.NFCException)1 VirtualISO14443Part4TypeATarget (net.rim.device.api.io.nfc.emulation.VirtualISO14443Part4TypeATarget)1 NfcVirtTargListener (nfc.sample.virtual.target.NfcVirtTargListener)1