2013-11-20 17 views
1

我想在探索附近屏幕上直接打開Goog​​le地圖應用程序,例如,這樣吃截圖這裏Android意圖在探索附近屏幕上打開Goog​​le地圖應用程序

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

我可以用下面的代碼

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); 

但我希望它直接去探索它通過點擊到達鄰近屏幕打開谷歌地圖應用搜索欄>然後點擊附近的探索>吃圖標。

我只想通過打開谷歌地圖應用程序,然後點擊搜索欄>吃點自動化點擊步驟。因此,探索附近吃谷歌地圖頁面顯示給用戶...這可能嗎?

在此先感謝。

+0

你有沒有找到一個答案? – clocksmith

回答

-1

是的,你可以使用Google Places API

請將您的數據添加到以下URL並傳遞給您的意圖。

字符串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

可以檢查文檔以下網址:https://developers.google.com/places/documentation/search

+0

嗨,我試過這個,但它只是打開正常的應用程序,而不是在地方吃的頁面。 – user3013243

相關問題