Databse implementation

mSendButton.setOnClickListener(new View.OnClickListener(){
	@Override
	public void onClick(View view){
		mMessageEditText.setText("");
	}
});
{
	"rules": {
		".read": true,
		".write": ture
	}
}

Database Security
-Database security rules
-Security rule configuration examples
-Authentication with Firebase

{
	"chat": {
		"messages": {
			"-KS3PV-iwUZp5wkNq70s":{
				"name": "person1",
				"text": "hey!"
			},
			"-KS3PXhIhs8J_inrExy4":{
				"name": "person2",
				"text": "what's up?"
			}
		}
	},
	"special_chat": {
		"messages": {
			"-KR-DwqtKzlWGxSn9P0y":{
				"name": "person1",
				"text":"want to go to the movies?"
			},
			"-KR4tIpWmNn-EYxquSrw": {
				"name": "person3",
				"text": "Yeah! let's meet at 7."
			}
		}
	},
	"users": {
		"uid1":{
			"paid":true
		},
		"uid2": {
			"paid": false
		},
		"uid3": {
			"paid": true
		}
	}

}

Firebase Realtime Database

what is firebase databse?
what can it be used for?
realtime database in action
database structure best practices

“:
“golden”: 1.618
“fog”: true
“palindrome”: “tacocat”
“messages”: “message1”: “name”:”person”, “text”:”Hello?”
“message2”: “name”:”Individual”, “text”:”Hi!”

node should be “child” and “parent

{
	"questions": {
		"ABCDakarandomkey": {
			"question": "Who was the 13th president of the United States?"
			"choice_1": "Millard Fillmore",
			"choice_2": "Zachary Taylor",
			"choice_3": "Franklin Pierce",
			"choice_4": "James K. Polk",
			"answer" :"choice_1"
		},
		"EFGHakarandomkey":{
			"question": "In what year was the first gasoline combustion engine invented?",
			"choice_1":"1769",
			"choice_2":"1886",
			"choice_3":"1807",
			"choice_4":"1864",
			"answer": "choice_4"
		}
	},
	"players":{
		"user_key_1":{
			"name":"Person",
			"opponents":{
				"IJKLakarandomkey":"user_key_2",
				"MNOPakarandomkey":"user_key_6"
			},
			"questions":{
				"ABCDakarandomkey": "Correct",
				"EFGHakarandomkey": "Incorrect"
			}
		},
		"user_key_2": {
			"name": "Mai",
			"opponents": {
				"QRAAakarandomkey": "user_key_1",
				"SQUEakarandomkey": "user_key_6"
			},
			"questions": {
				"ABCDakarandomkey":"Incorrect",
				"EFGHakarandomkey":"Incorrect"
			}
		}
	},
	"opponents": {
		"couple_Key_1": "user_key_1_user_key_2",
		"user_1": "user_key_1",
		"user_2": "user_key_2",
		"winner": "user_key_1"
	}
}