Repeat execution of function infini android studio
// this variable use to repeate execution of getLocation(); Runnable mStatusChecker = new Runnable() { @Override public void run() { try { getLocation(); // you can change this function by //what ever you want } finally { mHandler.postDelayed(mStatusChecker, mInterval); } } }; // call this function in your code where you want start the function //ex getLocation void startRepeatingTask() { mStatusChecker.run(); }