SCiO Device callback
July 23, 2015

The SCiO device class enables the application to register the following callback functions:

  • setButtonPressedCallback(): A callback method activated when the user presses the SCiO sensor’s button.

The following code sample implements the setButtonPressedCallback method.

myScio.setButtonPressedCallback(new ScioDeviceCallback() {
   @Override
   public void execute() {
       Log.d("DemoApp","SCiO Button was pressed");
   }
});

  • setScioDisconnectCallback(): A callback method activated when communication between the SCiO sensor and the app fails.

The following code sample implements the setScioDisconnectCallback method.

myScio.setScioDisconnectCallback (new ScioDeviceCallback() {
        @Override
        public void execute() {
                Log.d ("DemoApp", "SCiO disconnect") ;
           }
});

 

Leave a Reply