从我的应用程序打开谷歌地图活动,如果用户到达目的地,则将用户重定向到我的应用程序

时间:2016-07-25 12:00:47

标签: android google-maps

我想打开谷歌地图转动按钮点击转向方向屏幕,并想检查用户是否到达目的地将用户重定向到我的应用程序目前我正在使用此代码打开谷歌地图

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

我想在用户到达目的地后将其重定向到我的应用程序。

1 个答案:

答案 0 :(得分:0)

您可能希望了解地理围栏的概念。 以下链接可能会有所帮助: https://developer.android.com/training/location/geofencing.html https://github.com/googlesamples/android-Geofencing

相关问题