2016-07-25 16 views
2

我想打開谷歌地圖轉動方向按鈕點擊屏幕上,並希望檢查用戶是否到達目的地將用戶重定向到我的應用目前我使用此代碼,打開谷歌地圖從我的應用程序打開谷歌地圖活動,如果用戶到達目的地,將用戶重定向到我的應用程序

  String uri = String.format(Locale.ENGLISH, "geo:0,0?q="+ destinationLoc.latitude+","+destinationLoc.longitude 
        + "(The Embroidery Store)"); 
      Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri)); 
      intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 
      context.startActivity(intent); 

我想他到達目的地後,將用戶重定向到我的應用程序。

回答

相關問題