This file contains hidden or 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 class Main { | |
| static ValueEventListener mListener; | |
| public static void main(String[] args) throws Exception { | |
| Firebase ref = new Firebase("https://<your-app>.firebaseio.com/"); | |
| mListener = ref.addValueEventListener(new ValueEventListener() { | |
| @Override | |
| public void onDataChange(DataSnapshot snapshot) { | |
| if (snapshot.exists()) { | |
| System.out.println("The value is now "+snapshot.getValue()); |
This file contains hidden or 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
| package com.google.firebase.zerotoapp; | |
| public class ChatMessage { | |
| public String name; | |
| public String message; | |
| public ChatMessage() { | |
| } | |
| public ChatMessage(String name, String message) { |