Android Google Map Intent

Open Google map intent using URI

Format(basic)

geo:,

If you want to use marker

geo:,?q=,

Example

val uri = Uri.parse(String.format("geo:%.4f,%.4f?q=%.4f,%.4f",
                        latitude, longitude,
                        latitude, longitude))
val mapIntent = Intent(Intent.ACTION_VIEW, uri)
mapIntent.setPackage("com.google.android.apps.maps")
context.startActivity(mapIntent)

latitude and longitude are from geo location API(double).