I have a thread with an infinite loop inside like the following
private Thread mThread = new Thread(){
    while(true){
        Looper.prepare();
        Toast.makeText(context, "test", Toast.LENGTH_LONG).show();
        Looper.loop();
        Thread.sleep(15000); 
    }
};
I had the code without Looper.prepare and loop but it didn't compile. After adding the Looper code my thread gets executed one time. Of course I want the code to execute every 15 seconds. Is there any way to solve this?
 
     
     
    