i am developing android app to get direction between 2 location, as below
Intent intent = new Intent(android.content.Intent.ACTION_VIEW;
Uri.parse("http://maps.google.com/maps?saddr=12.84281852,80.22529753&daddr=13.00355419,80.200881958"));
startActivity(intent);
Running this application, it is prompting me to choose one among 1) Browser 2) Map
How to open it in map by default in coding??
I think if you call
setPackage()with'com.google.android.apps.maps'it should launch Google maps.This worked fine for me: