0
I have a service running a stopwatch that loops from one in a second, how to set the text in the open Activity? I’m using:
//tempo
         new Thread(new Runnable() {
               @Override
               public void run(){
                   int jumpTime = 30;
                   int limiteTempo = 0;
                   String id_chamado = String.valueOf(id_cham);
                   Log.i("aviso","id chamado"+id_chamado);
                  while(limiteTempo < 31){
                     try {
                         Thread.sleep(1000);
                         if(jumpTime==0){
                            Log.i("aviso","acabou tempo");
                            break;
                         }
                            Log.i("aviso",String.valueOf(jumpTime ));
                            jumpTime = jumpTime -1;
                            limiteTempo++;
                     } catch (InterruptedException e) {
                       // TODO Auto-generated catch block
                       e.printStackTrace();
                     }
                  }
               }
               }).start();
I got what I wanted is here
– Emerson Barcellos