这里映射Android应用程序

1 android here-api

是否可以使用Waze或Google Maps等"活动启动器"启动Android Here应用?

例子:

Google Maps Navigator:

动作:android.intent.action.VIEW
DataUri:google.navigation:q = [要搜索的地址]&mode = [walking/transit]

Waze的:

操作:android.intent.action.VIEW
DataUri:waze://?q = [要搜索的地址]&navigate = yes

小智 10

我在这里启动了以下app:

String url = "geo:" + lat + "," + lng;
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse(url));
intent.setPackage("com.here.app.maps");
startActivity(intent);
Run Code Online (Sandbox Code Playgroud)

但我没有找到任何有关意图的文件.但实际上它有效.


小智 5

@Ostermann的答案非常合适,但它只能确定地图上的最终位置.如果您想自动启动导航模式(即计算可用路径),您可以使用

String url = "google.navigation:q=" + lat + "," + lng;
Run Code Online (Sandbox Code Playgroud)

我已经检查过,它运作得很好.