I have this Chronometer
in my main activity and I want to get the value of this chronometer after the user finished the given task in the mainActivity.class and display it to the next activity (end.class)
MainActivity.class snippet:
private void showElapsedTime() {
long timeElapsed = SystemClock.elapsedRealtime() - chrono.getBase();
int millis = (int) timeElapsed;
int seconds = (int) timeElapsed/1000;
int minutes = seconds/60;
Toast.makeText(this, "Level1 - Elapsed time: " + minutes + ":" + seconds,
Toast.LENGTH_LONG).show();
}
end.class:
TextView Set1;
Set1 = (TextView) findViewById (R.id.time1);
How can I get the chronometer value from the MainActivity.class and display it in my textview in end.class?