I have an application based on google maps, in which I am opening route planner using intent. But, when application starts, it prompts dialog box to user with option of default browser and maps. But, I want that when application starts, it should open in maps by default. Below I am posting my code.
public class RoutePlannerActivity extends MapActivity {
public static final String TAG = "Route planner";
MapView mapView;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mapView = (MapView)findViewById(R.id.mapView);
mapView.setBuiltInZoomControls(true);
Log.d(TAG, "onCreate");
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("http://maps.google.com/maps?saddr=28.6667,77.2167&daddr=28.5700,77.3200"));
startActivity(intent);
}//onCreate
protected boolean isRouteDisplayed() {
Log.d(TAG, "Route displayed");
return true;
}//isRouteDisplayed
}//class