Created
January 28, 2022 06:40
-
-
Save gmYusuf/ce997cb613f9d733e4c2fab6f20e7479 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ReadFromDatabase() | |
{ | |
FirebaseDatabase database = FirebaseDatabase.DefaultInstance; | |
DatabaseReference myRef = database.GetReference("message"); | |
ValueEventListener valueEventListener = new ValueEventListener(); | |
myRef.AddValueEventListener(valueEventListener); | |
} | |
private class ValueEventListener : IValueEventListener | |
{ | |
public void onCancelled(DatabaseError error) | |
{ | |
Debug.Log("[HMSP:] ValueEventListener onCancelled "); | |
} | |
public void onDataChange(DataSnapshot snapshot) | |
{ | |
Debug.Log("[HMSP:] ValueEventListener onDataChange "); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment