title: Communication between two Activities?
body: <p>I'm making an app in which I'm using GoogleMaps.Now, I have a question about communication between MapActivity and ToursActivity.To simplify it, my app is about band Metallica, and I have list of Tours. When user clicks on one of the Tours, it should open a new Activity with that location. I won't put  ToursActivity here, cause there is a bunch of code that you don't need.Also, I'm keeping all my data on Firebase, if that's important.</p>
  
  <p>This is my MapActivity:</p>
  
  <pre><code>public class MapActivity extends AppCompatActivity implements OnMapReadyCallback {
  
  
  
  private static final int REQUEST_LOCATION_PERMISSION = 10;
  private GoogleMap.OnMapClickListener mCustomOnMapClickListener;
  
  private GoogleMap mGoogleMap;
  private MapFragment mMapFragment;
  @BindView(R.id.lvTours) ListView lvTours;
  
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.tours_coord);
      this.initialize();
  
      lvTours.setOnItemClickListener(new AdapterView.OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
  
          }
      });
  }
  
  
  public void initialize(){
      this.mMapFragment = (MapFragment) getFragmentManager().findFragmentById(R.id.fGoogleMap);
      this.mMapFragment.getMapAsync(this);
      this.mCustomOnMapClickListener = new GoogleMap.OnMapClickListener() {
          @Override
          public void onMapClick(LatLng latLng) {
              MarkerOptions newMarkerOptions = new MarkerOptions();
              newMarkerOptions.icon(BitmapDescriptorFactory.fromResource(R.mipmap.tour));
              newMarkerOptions.title("Tour");
              newMarkerOptions.snippet("It' was here!");
              newMarkerOptions.position(latLng);
              mGoogleMap.addMarker(newMarkerOptions);
          }
      };
  }
  
  
  @Override
  public void onMapReady(GoogleMap googleMap) {
      this.mGoogleMap = googleMap;
      UiSettings uiSettings = this.mGoogleMap.getUiSettings();
      uiSettings.setZoomControlsEnabled(true);
      uiSettings.setMyLocationButtonEnabled(true);
      uiSettings.setZoomGesturesEnabled(true);
      this.mGoogleMap.setOnMapClickListener(this.mCustomOnMapClickListener);
     goToLocation(33.835293 , -117.914505);
  }
  
  
  public void goToLocation(double lat, double lng){
  
      LatLng latLng = new LatLng(lat, lng);
  
  
      CameraPosition position = CameraPosition.builder()
              .target(latLng)
              .zoom(16f)
              .bearing(0.0f)
              .tilt(0.0f)
              .build();
  
      mGoogleMap.animateCamera(CameraUpdateFactory.newCameraPosition(position),null);
  }
  
  
  
  
  private boolean hasLocationPermission() {
  
      String LocationPermission = android.Manifest.permission.ACCESS_FINE_LOCATION;
      int status = ContextCompat.checkSelfPermission(this, LocationPermission);
      if (status == PackageManager.PERMISSION_GRANTED) {
  
          this.mGoogleMap.setMyLocationEnabled(true);
  
          return true;
  
      }
      return false;
  }
  
  private void requestPermission() {
      String[] permission = new String[]{Manifest.permission.ACCESS_FINE_LOCATION};
      ActivityCompat.requestPermissions(MapActivity.this, permission, REQUEST_LOCATION_PERMISSION);
  
  }
  }
  </code></pre>