简体   繁体   English

如何使我的应用接收诸如Google Maps之类的位置信息

[英]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. 如果你打开像一个链接这个 Android手机谷歌地图会自动打开并显示您在它的地图位置。

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 假设链接存储为String变量链接

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!! 尝试这个!!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Mapbox 中添加位置按钮,例如 Google Maps 的 setMyLocationButtonEnabled? - How to add a location button in Mapbox like Google Maps' setMyLocationButtonEnabled? 如何将我的Android应用程序链接到另一个内置应用程序(例如Google Maps)? - How do i link my android app to another built in application like google maps? 如何让我的应用程序可从任何其他应用程序(如 Google 翻译应用程序)访问? - How to make my app accessible from any other app like Google Translate app? 如何使用appium在Android应用程序Google地图中设置位置 - How to set Location in android app Google maps using appium Google Maps for Mobile“我的位置”功能如何工作? - How does the Google Maps for Mobile “My Location” feature work? 构建我的应用并安装Google Maps API之后,我倾向于搜索位置时,我的APP就会崩溃 - After builing my app and Installing Google Maps API, My APP crashes anytime I tend to search for Location 在setMyLocationEnabled eclipse上在Google地图上定义我的位置 - define my location on google maps on setMyLocationEnabled eclipse 在我的应用中检索地理位置的准确性远不及Google Maps应用在设备上同时显示的地理位置 - Retrieving geo location in my app is far less accurate than what Google Maps app shows in the same time on my device 如何在我的应用程序中使用Google Maps数据 - How can I use Google maps data in my app Google Maps v2我在Google Play中的位置 - Google Maps v2 my location with Google Play
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM