I am working on an app with recorder and player. I am using mediaplayer to play the recorded .wav file and meantime I want to update to a seekbar. Everything is working fine But
player.prepare(); // or start() ScheduledExecutorService service = Executors.newScheduledThreadPool(1); service.scheduleWithFixedDelay(new Runnable() { @Override public void run() { progressBar.setProgress(player.getCurrentPosition()); } }, 1, 1, TimeUnit.MICROSECONDS);