title: i can't get coordinates double of firebase
body: <p>i wanna keep the position of the db in a variable but it dont work property and when i run the application it crashed how can i solved it.</p>
  
  <pre><code>double latitud=0.0;
  double longitud = 0.0;
  latitudRef.addValueEventListener(new ValueEventListener(){
          @Override
          public void onDataChange(DataSnapshot dataSnapshot){
              Double value = dataSnapshot.getValue(Double.class);
              latitud = value;
          }
          @Override
          public void onCancelled(DatabaseError databaseError){
  
          }
      });
      longitudRef.addValueEventListener(new ValueEventListener(){
          @Override
          public void onDataChange(DataSnapshot dataSnapshot){
              Double value1 = dataSnapshot.getValue(Double.class);
              longitud = value1;
          }
          @Override
          public void onCancelled(DatabaseError databaseError){
  
          }
      });
  </code></pre>