Can I launch other activites from different markers on Google Maps?
<p>I have a main activity and on that i have some markers ( too much to initialize them one by one )
When i click on the infowidow i want to open a fragment with the specific marker.
Currently i have something like this</p>

<pre><code>  for( i = 0; i&lt;j; i++)
            {
                hely = helyek.get(i);
                if(hely.getStars()&gt;=2){
                    hely.getHelyId();
                    Marker marker = mMap.addMarker(new MarkerOptions().position(new LatLng(hely.getLat(),hely.getLng()))
                            .title(hely.getHelynev())
                            .snippet(hely.getHelycim())
                            .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));
                    markers.add(marker);
</code></pre>

<p>This adds the markers to the Map.</p>

<pre><code>    public void onMapReady(GoogleMap googleMap) {
    int j;
    int i=0;
    List&lt;Marker&gt; markers = new ArrayList&lt;Marker&gt;();
    mMap = googleMap;        
    mMap.getUiSettings().setMyLocationButtonEnabled(true);
    mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {
        @Override
        public void onInfoWindowClick(Marker marker) {
            Intent intent = new Intent(getApplicationContext(), HelyDetailActivity.class);
            intent.putExtra(ListActivity.HELY_NEV_EXTRA, hely.getHelynev());
            intent.putExtra(ListActivity.HELY_CIM_EXTRA, hely.getHelycim());
            intent.putExtra(ListActivity.HELY_JOVALASZOK, hely.getJovalaszok());
            intent.putExtra(ListActivity.HELY_OSSZKERDES, hely.getOsszkerdes());
            intent.putExtra(ListActivity.HELY_ID_EXTRA, hely.getHelyId());
            intent.putExtra(ListActivity.HELY_LAT,hely.getLat());
            intent.putExtra(ListActivity.HELY_LONG, hely.getLng());
            startActivity(intent);
        }
    });
    mMap.setMyLocationEnabled(true);
}
</code></pre>

<p>This opens an activity of coures but the same one every time. How can i define which marker I clicked?</p>