1
I got this mistake.
Can’t create Handler Inside thread that has not called Looper.prepare()
The goal is to repeat the function that receives the map every 1000 thousandths of a second.
Timer t = new Timer();
//Set the schedule function and rate
t.scheduleAtFixedRate(new TimerTask() {
@Override
public void run() {
try {
recebemapa();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}
},
//Set how long before to start calling the TimerTask (in milliseconds)
0,
//Set the amount of time between each execution (in milliseconds)
1000);
I call this code in the method OnCreate()
The method
recebemapa()
access methods of any View?– ramaral
Yes you have access to methods.
– Tiago Coelho