title: Java android open street map CustomInfoWindow close infoWindow when click in image
body: <p>This is how I create a CustomInfoWindow :</p>
  
  <pre><code>private class CustomInfoWindow extends MarkerInfoWindow {
  POI mSelectedPoi;
  
  CustomInfoWindow(MapView mapView) {
      super(R.layout.bonuspack_bubble, mapView);
      Button btn = (Button) (mView.findViewById(R.id.bubble_moreinfo));
      btn.setOnClickListener(new View.OnClickListener() {
          public void onClick(View view) {
              Singleton si = Singleton.getInstance();
              ObjectDefExtends obj = si.getCurrentObject();
              if (obj != null &amp;&amp; Singleton.getInstance().getListaVisible().size() &gt; 0) {
                  ObjectDefExtends currentObject = si.getCurrentObject();
                  double latitude = currentObject.lat;
                  double longitude = currentObject.lon;
                  String label = currentObject.name;
                  String uriBegin = "geo:" + latitude + "," + longitude;
                  String query = latitude + "," + longitude + "(" + label + ")";
                  String encodedQuery = Uri.encode(query);
                  String uriString = uriBegin + "?q=" + encodedQuery + "&amp;z=16";
                  Uri uri = Uri.parse(uriString);
                  Intent intent = new Intent(android.content.Intent.ACTION_VIEW, uri);
                  startActivity(intent);
              }
          }
      });
  }
  
  @Override
  public void onOpen(Object item) {
      super.onOpen(item);
      mView.findViewById(R.id.bubble_moreinfo).setVisibility(View.VISIBLE);
      Marker marker = (Marker) item;
      mSelectedPoi = (POI) marker.getRelatedObject();
  }
  }
  </code></pre>
  
  <p>And I try do it this when I click btn and go to new intent I want to close this InfoWindow. When I go back  from this intent all the time I see this InfoWindow</p>