简体   繁体   English

Android打算在“探索附近”屏幕上打开Goog​​le Maps应用程序

[英]Android Intent To Open Google Maps Application At Explore Nearby Screen

I want to directly open up Google Maps Application at the Explore Nearby Screen, eg Eat like this screenshot here 我想在“附近浏览”屏幕上直接打开Goog​​le Maps Application,例如,在此处像这样的屏幕截图吃

https://dl.dropboxusercontent.com/u/14944627/Google%20Maps%20Application%20Image.png https://dl.dropboxusercontent.com/u/14944627/Google%20Maps%20Application%20Image.png

I can open Google Maps Application using the following code 我可以使用以下代码打开Goog​​le Maps Application

 String uri = "http://maps.google.com/";
 Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri));
 intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
 startActivity(intent);

But I want it to go directly to the Explore Nearby Screen which is reached by clicking on the Search Bar > Then click on the explore nearby > eat icon. 但我希望它直接转到“探索附近”屏幕,方法是单击搜索栏>然后单击“探索附近”> eat图标。

I just want to automate the click steps by opening the google maps application and then clicking on the search bar > eat. 我只想通过打开google maps应用程序然后单击搜索栏> eat来使点击步骤自动化。 So that the explore nearby eat google maps page is displayed to the user ... is this possible? 以便向用户显示附近的“探寻美食”谷歌地图页面……这可能吗?

Thanks in advance. 提前致谢。

yes you can use Google Places API . 是的,您可以使用Google Places API

Please add you data to following URL and pass it to your intent. 请将您的数据添加到以下URL,并将其传递给您的意图。

String url= " https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=AddYourOwnKeyHere " 字符串url =“ https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=AddYourOwnKeyHere

You can check following URL for documentation: https://developers.google.com/places/documentation/search 您可以检查以下URL以获取文档: https : //developers.google.com/places/documentation/search

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

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