Use handler class to run code after some time of period
Here is code:
Define object of handler class
private static final long GET_DATA_INTERVAL = 1000;
Handler hand = new Handler();
put this code into your on create method of activity:
hand.postDelayed(run, GET_DATA_INTERVAL);
Add void run method into your main class
Runnable run = new Runnable() {
@Override
public void run() {
new azan().execute();
hand.postDelayed(run, GET_DATA_INTERVAL);
};