I want to share a location attached to my share intent. Is it possible?
Something like this, but adding location information:
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, "The status update text");
startActivity(Intent.createChooser(intent, "Dialog title text"));
Thanks.
You can put your location data as part of the text of the message, in
EXTRA_TEXT.Or, you are welcome to invent a new extra (e.g.,
EXTRA_LOCATION), put the location data in there, and then convince all the world’s Android developers to use it where relevant when they implement activities that respond toACTION_SEND.But, beyond those two choices,
ACTION_SENDdoes not support anything else related to location.