Reputation: 3940
I am using startActivityForResult
to show new activity(map Activity). In new activity i use setResult
.
How I can return two float values to previous activity (longtitude,latitude from map Activity) ?
Is it possible ?
Upvotes: 1
Views: 95
Reputation: 6849
you can use the following code
Intent intent = new Intent();
intent.putExtra("latitude", latitude);
intent.putExtra("longitude", longitude);
setResult(RESULT_OK, intent);
you can then retrieve them from previous activity
Upvotes: 3