sto provando a visualizzare un messaggio ogni 1 minuto !! non stop! ho trovato un esempio che mostra il messaggio solo una volta dopo un ritardo fisso !! puoi aiutare come si può impostare ?? o se usare il timer è meglio come funziona ho bisogno di un esempio !!gestore o timer android
public class TimertestActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
Handler handler = new Handler();
handler.postDelayed(
new Runnable() {
public void run() {
afficher();
}
}, 1000L);
}
public void afficher()
{
Toast.makeText(getBaseContext(),
"test",
Toast.LENGTH_SHORT).show();
}
}
Grazie!
Se hai trovato una soluzione che funziona per voi, si prega di accettare la risposta. –