public class RegisterListenerCommand extends AlwaysExecutableCommand {
public void execute(ReadOnlyCommandMetadata metadata, Object context) {
NfcReadNdefSmartTagScreen screen = NfcReadNdefSmartTagScreen.getInstance();
NdefListenerManager listener_mgr = NdefListenerManager.getInstance();
NfcReadNdefSmartTagListener listener = NfcReadNdefSmartTagListener.getInstance();
synchronized(UiApplication.getUiApplication().getEventLock()) {
listener_mgr.registerListener(listener);
screen.setLed();
synchronized (UiApplication.getEventLock()) {
UiApplication.getUiApplication().pushScreen(screen);
}
}