Reputation: 58
I just setup a firebase realtime database that has JSON [Continent:{key:"old"}]
But, it never changes how ever I try.
Here's my code
public class MainActivity extends AppCompatActivity {
FirebaseDatabase db;
DatabaseReference ref;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
db = FirebaseDatabase.getInstance();
ref = db.getReference("Continent");
ref.child("key").setValue("The new value");
}
}
I've set the security rules like
"rules": {
".read": true,
".write": true
}
when I check the value on the phone, it does say it changed to "The new value" but on the database, it stays the same.
Upvotes: 0
Views: 26
Reputation: 58
After a full annoying day,
I just found out my emulator internet wasn't working, tried to fix it many ways and failed, and finally Cold Booted it, and worked fine.
Upvotes: 1