Intent intent=new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("geo:47.6,-122.3"));
if(intent.resolveActivity(getPackageManager())!=null)
{
startActivity(intent);
}
I Tried this ScreenShot of Adnroid studio
Intent intent=new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("geo:47.6,-122.3"));
if(intent.resolveActivity(getPackageManager())!=null)
{
startActivity(intent);
}
Expecting to let me move to map app but not working
CodePudding user response:
String uri = String.format(Locale.ENGLISH, "geo:%f,%f", 47.6, -122.3);
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(intent);
Try above code