0

I am trying to do an activity that show the infowindow of the google map marker in which you are.

I think initially to use geofences in each marker, and when you enter in it the infowindow should be open. However, I found what I think was a easier way to accomplish this: LocationManager.addProximityAlert. I add as much ProximityAlert as markers, the problem is that ProximityAlert method launch an Intent, and in another activity I can't show the marker's infowindow from the original activity, or at least I can`t found how. So my questions are:

  • Can I open google map marker's infowindow with LocationManager.addProximityAlert? How?
  • Should I use Geofence and new GoogleApi client instead?
Mysterion
  • 9,050
  • 3
  • 30
  • 52
eamh0001
  • 1
  • 2

1 Answers1

0

It is not the intent in the addProximityAlert method, Its a pending intent. So the pending intent should be invoked when the user enters in a geofenced region. In the same declaration you have to write the code for the info window pop up. This will resolve your issue.

Here are some insights you can get in the following tutorial.

AniV
  • 3,997
  • 1
  • 12
  • 17
  • Thanks for answer. Yes you are right, is a PendingIntent not an Intent but in essence is the same, it will invoque a new activity and in a new activity I can't show the infowindow of the original activity. Maybe what I want can not be done or maybe I lost the point. Should I give up and try to fire a AlertDialog with this PendingIntent that show the same information than the marker's InfoWindow? – eamh0001 Feb 12 '15 at 09:20
  • Yes, Using an AlertDialog would be a good choice as you want to show everything on the same activity and that fits in your specs. This link (http://stackoverflow.com/questions/15874144/show-dialoge-using-pending-intent-in-android) may help!! Thanks... – AniV Feb 12 '15 at 21:54