I have a problem and the data is not synchronized, the file compiles, followed this tutorial link and compiles correctly but I do not change the data, since android I got it.
I followed this tutorial link
Any ideas?
FileInputStream serviceAccount = new FileInputStream("keyok.json");
FirebaseOptions options = new FirebaseOptions.Builder()
.setCredentials(GoogleCredentials.fromStream(serviceAccount))
.setDatabaseUrl("https://name.com/")
.build();
FirebaseApp.initializeApp(options);
DatabaseReference ref = FirebaseDatabase.getInstance().getReference();
DatabaseReference usersRef = ref.child("users");
Map<String, User> users = new HashMap<>();
users.put("alanisawesome", new User("June 23, 1912", "Alan Turing"));
users.put("gracehop", new User("December 9, 1906", "Grace Hopper"));
usersRef.setValueAsync(users);