I am having two page, in one page am having chronometer, after I left and come back the page the chronometer has stopped, any one can tell me how to redirect the page
My code:
Chronometer chrono=(Chronometer)findViewById(R.id.chronometer);
chrono.setBase(SystemClock.elapsedRealtime());
chrono.start();
thank you
I have no idea what you mean by “redirect the page”, but it sounds as if you should read up on Android application fundamentals. Android activities do not execute when not in foreground. If you want to reset the clock once the activity is again in the foreground, you should probably override Activity.onResume().