简体   繁体   中英

How to make my app receive location intents like Google Maps

If you opened a link like this on your android phone Google maps will automatically open and show you the location on it's map.

I want to make my app receive intents if the user opened a link like this and also i want to get the lat,long from that link. Is this Possible ?

Assuming the link is stored as String variable link

Now,

String[] split_link = link.split(Pattern.quote("@"));
String[] post_link = split_link[1].split(Pattern.quote(","));

double lattitude = Double.parseDouble(post_link[0]);
double longitude = Double.parseDouble(post_link[1]);

Try This!!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM