I need to send a string to another activity.
long timeSpent = System.currentTimeMillis() - initialTime;
timeSpent = (long) (timeSpent / 1000.0);
String string = "Game Over! Time spent " + String.valueOf(timeSpent) + "s";
I use this code, but it is wrong.
Intent intent = new Intent();
intent.putExtra("timespeent", timeSpent);