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");
}
}
Aggregations