Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

315
Visualizações
Geo Intent Label not showing in Google Maps App

Since my Google Maps app updated recently, now version 10.11.1, the following code does not show the label as expected, documented, and previously working:

  val intent = Intent(Intent.ACTION_VIEW, Uri.parse("geo:38.8951,100.0364?q=38.8951,100.0364(foo)")).setPackage("com.google.android.apps.maps")
  if (intent.resolveActivity(packageManager) == null) {
    intent.setPackage(null)
  }
  startActivity(intent)

And neither does this version (with 0,0 immediately after geo:):

  val intent = Intent(Intent.ACTION_VIEW, Uri.parse("geo:0,0?q=38.8951,100.0364(foo)")).setPackage("com.google.android.apps.maps")
  if (intent.resolveActivity(packageManager) == null) {
    intent.setPackage(null)
  }
  startActivity(intent)

Neither does the example code in the official documentation show a label:

// Display a label at the location of Google's Sydney office
Uri gmmIntentUri = Uri.parse("geo:0,0?q=-33.8666,151.1957(Google+Sydney)");
Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);
mapIntent.setPackage("com.google.android.apps.maps");
startActivity(mapIntent);

no "Google Sydney" label on Moto G5

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

Update: Scheduled to be fixed in v11.12 perhaps before the end of January 2022.

No solution still even with latest map update 10.12.1 the label still does not show even if the documentation still says it should I've created an issue on Google's Issue tracker: https://issuetracker.google.com/issues/129726279

hopefully we'll have some information shortly.

over 4 years ago · Santiago Trujillo Relatório

0

Per Google, it's a bug in the Google Maps app. It's fixed in version 11.12.

over 4 years ago · Santiago Trujillo Relatório

0

I think we are going about it the wrong way here. If I was Google, I would also feel insecure about allowing developers to post directions with an abstract destination label, I am sure they never plan to fix this.

I recommend the following solution according to Google's new standards. https://developers.google.com/maps/documentation/urls/android-intents:

https://www.google.com/maps/dir/?api=1&destination=LATITUDE,LONGITUDE

If you look at most apps these days, including the ones I have built, this allows us to post a LAT/LONG for the user to go to with Google's own Address values built in as the destination label.

To actually launch the Google Maps application, simply launch a web intent, I use the application context in this case.

    fun startGoogleMaps(context: Context, lat: Double, long: Double) {
        startWebBrowser(
            context,
            Uri.parse("https://www.google.com/maps/dir/?api=1&destination=$lat,$long")
        )
    }

    fun startWebBrowser(context: Context, link: Uri?) {
        if (link != null) {
            val webIntent = Intent(Intent.ACTION_VIEW, link).apply {
                addFlags(FLAG_ACTIVITY_NEW_TASK)
            }
            if (webIntent.resolveActivity(context.packageManager) != null) {
                context.startActivity(webIntent)
            }
        }
    }
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda