So you'd store the data for each user under their own user id (uid):
userdata
<uid>
data1: value1
data2: value2
Now each user can read their own data with:
var currentUser = firebase.auth().currentUser;
var ref = firebase.database().ref('userdata').child(currentUser.uid);
ref.on('value', function(snapshot) {
console.log(snapshot.val());
});
That's JavaScript syntax btw. Translate it to Android with the help of the Android guide: https://firebase.google.com/docs/database/android/start/
And then you secure access to that data with these rules:
{
"rules": {
"userdata": {
"$uid": {
".read": "auth.uid == $uid",
".write": "auth.uid == $uid"
}
}
}
}