AlanCallback myCallback = new AlanCallback() {
    @Override
        public void onCommandReceived(EventCommand eventCommand) {
            super.onCommandReceived(eventCommand);
            //Handle command here
        }
    };
alanButton.registerCallback(myCallback);
            

val myCallback: AlanCallback = object : AlanCallback() {
override fun onCommandReceived(eventCommand: EventCommand) {
    super.onCommandReceived(eventCommand)
    //Handle command here
    }
}
alan_button.registerCallback(myCallback)