android - Sharing Map based Location -


i have developed application shows one's location on map. how go sharing current location others using application? possible send them notification let them know current location?

a format use send location leverage maps.google.com site, like:

"http://maps.google.com/maps?q=" + loc_x + "," + loc_y + "&iwloc=a" 

this string can inserted sms or email message. found this site info formating url automatically open map centered on given coordinates. possible implementation sms be:

string message =               "http://maps.google.com/maps?q=" + loc_x + "," + loc_y + "&iwloc=a";  private void sendsms(string phonenumber, string message){      smsmanager sms = smsmanager.getdefault();     log.d(tag, "attempting send sms to: " + phonenumber);     try {         sms.sendtextmessage(phonenumber, null, message, null, null);     } catch (exception e) {         log.e(tag, "error sending sms to: " + phonenumber + " :: " + e);     }         }   

where loc_x , loc_y represent lat , lon locationmanager instance.


Comments