1

I have this code:

Log.d("1", String.valueOf(c));

runOnUiThread(new Runnable() {
@Override
     public void run() {
         Log.d("2", String.valueOf(c));
     }
});

The problem here is that out of the runOnUiThread: the 1 = [1]

In in the runOnUiThread: the 2 = []

I need to run some code in the runOnUiThread.

Whats happening?

EDIT:

The console.log shows this>

08-03 14:16:59.728 11039-13685/com.example.ortel.tagnet 1: [1]
08-03 14:16:59.728 11039-13685/com.example.ortel.tagnet 2: []

They show 2 different values for the same variable.

Ron Arel
  • 371
  • 1
  • 5
  • 14

0 Answers0