I am building an android application which would store latitude and longitude information from google maps. The application receives the Send/Share intent from Google maps when user chooses location from map and extracts co-ordinates by un-shortening the goo.gl map link (e.g. http://goo.gl/maps/FcglP) embedded in intent. This task is easy if the location being shared from google maps is unknown or named "dropped pin". In that case the un-shortened URL looks like
http://maps.google.com/?q=17.50122123,74.12351323&.....
If the location is well known (http://goo.gl/maps/FcglP), e.g. some road, un-shortened URL looks like
http://maps.google.com/?q=Sutarwadi+Baner+Gaon+Rd%2C+Baner&ftid=0x3bc2becfa70b8b3f:0xd210c15f634bcec3&hl=en&gl=us
I have been searching for last three hours about how to extract the co-ordinates from this kind of URL but couldn't find any information. Is there any other method to extract co-ordinates from a given goo.gl map URL? Some already developed library or google API?