ui operation in connectAsync??

   ` MetaWearBoard board =  mwBoard[0];
            board.connectAsync()`

Can I Update UI in the connectAsync function? for instance, I want to let user know the connection status.

Comments

  • What do you mean by "in the connectAsync function"?

  • I mean I cannot set the textview content in its following "continueWithTask(task -> " part.

    For instance,
    tvConnectionStatus= (TextView)findViewById(R.id.connectionStatus);
    // tvConnectionStatus.setText("Sensor "+ iBoard+" is connected.");

  • Run UI functions on the UI thread.

  • any example?

  • Check the Android documentation or StackOverflow to Android specific questions.

Sign In or Register to comment.