I have a string in activity2
String message = String.format(
\"Current Location \\n Longitude: %1$s \\n Latitude: %2$s\", lat, lng);
I wan
Intents are intense.
Intents are useful for passing data around the android framework. You can communicate with your own Activities
and even other processes. Check the developer guide and if you have specific questions (it's a lot to digest up front) come back.
You can send data from one actvity to another with an Intent
Intent sendStuff = new Intent(this, TargetActivity.class);
sendStuff.putExtra(key, stringvalue);
startActivity(sendStuff);
You then can retrieve this information in the second activity by getting the intent and extracting the string extra. Do this in your onCreate()
method.
Intent startingIntent = getIntent();
String whatYouSent = startingIntent.getStringExtra(key, value);
Then all you have to do is call setText on your TextView
and use that string.