Android Google Maps API: Hide Marker Snippet

android, google-maps-android-api-2

Solution

Customize the info window contents via an `InfoWindowAdapter`, attached it to your `GoogleMap` via `setInfoWindowAdapter()`. Implement `onInfoContents()` on the adapter to return something that does not contain your snippet.

Problem

I am using the Google Maps API v2 and am trying to embed a reference ID to a marker info window. When a user clicks on the info window, it should pass the reference ID to a new intent. I don't actually want the reference ID to be visible to the user. I added the reference ID as a snippet and use marker.getSnippet() to get the reference ID to pass to the new activity. Is there a way to hide the snippet so the user doesn't see it?

Original source

Related problems