Android - Launching Google Navigation from an app

前端 未结 1 2040
长发绾君心
长发绾君心 2021-02-07 02:47

I am currently in progress of an android app, which takes some coordinates by the user (Starting point from gps and destination defined by the user)

I would like my app

1条回答
  •  名媛妹妹
    2021-02-07 03:20

    You can certainly guide them to a single point:

    Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("google.navigation:q=" +mLat+","+mLong));
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    startActivity(intent);
    

    Not sure about setting way points might be some way to do it, I think the API is undocumented so use at your own risk. You could have your app in the background listening to the GPS information and have it prompt the user at certain points.

    0 讨论(0)
提交回复
热议问题