Reading from a simple FireBase Database
Reading from a simple FireBase Database I'm having some issues reading from a Firebase Database. I have a pretty simple layout "lot" : "lot1" : "low", "lot2" : "low", "lot3" : "low" Of course MyAppName is above this all. FirebaseDatabase database = FirebaseDatabase.getInstance(); DatabaseReference myRef = database.getInstance().getReference(); // Read from the database myRef.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) // This method is called once with the initial value and again // whenever data at this location is updated. lotMap = (HashMap) dataSnapshot.getValue(); Log.d("[Directions Activity]: ", "Lot1 value ====== " +lotMap.get("lot")); Iterator it = lotMap.entrySet().iterator(); while (it.hasNext()) Map.Entry pair = (Map.Entry)it.next(); Log.d("[Directions Activity]: ", "iter