由网友(有些话、适合烂在心里)分享简介:我要调用谷歌地图的意图,而不显示完成操作对话框?I want to call google map intent without showing "Complete Action Dialog"?这可能吗?这是我的code。Is it possible? Here is my code.String uri =...
我要调用谷歌地图的意图,而不显示完成操作对话框?
I want to call google map intent without showing "Complete Action Dialog"?
这可能吗?这是我的code。
Is it possible? Here is my code.
String uri = "http://maps.google.com/maps?saddr=" + Utils.getLatitude(ShowDetails.this)+","+Utils.getLongitude(ShowDetails.this)+"&daddr="+userLatitude+","+userLongitude;
startActivity(new Intent(android.content.Intent.ACTION_DEFAULT, Uri.parse(uri)));
我不希望下面对话框调用谷歌地图的意图时显示。任何帮助是AP preciated。
I dont want to show below dialog when calling google map intent . Any Help is appreciated .
推荐答案
下面code可以帮助我解决我的问题。
Below code helps me to solve my question.
String uri = "http://maps.google.com/maps?saddr=" + Utils.getLatitude(ShowDetails.this)+","+Utils.getLongitude(ShowDetails.this)+"&daddr="+userLatitude+","+userLongitude;
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);
相关推荐
最新文章