I've added Firebase into my Android Studio however I am getting an error:
W/PersistentConnection: pc_0 - Firebase Database connection was forcefully killed by the server. Will not attempt to reconnect. Reason: The database lives in a different region. Please change your database URL to https://destination-e6a01-default-rtdb.europe-west1.firebasedatabase.app"
I changed the region but nothing is happening In my app I have this in my java code:
// Initialize Firebase in your app
FirebaseApp.initializeApp(this);
// Create a reference to your Firebase Realtime Database instance using the URL
FirebaseDatabase database = FirebaseDatabase.getInstance("https://Destination.firebaseio.com/");
Log.d("TAG", "Database URL: " + database.getReference().toString());
DatabaseReference myRef = database.getReference("destination-e6a01-default-rtdb");
Spinner categorySpinner = findViewById(R.id.spinner_categories);
String category = categorySpinner.getSelectedItem().toString();
double latitude = 52.519345;
double longitude = -6.610428;
VanCameraLocations speedvancameralocations = new VanCameraLocations(latitude, longitude, category);
myRef.push().setValue(speedvancameralocations);
I tried using this question however the answer for this question didn't work for me. My logcat is saying some information was uploaded to a database but the database I am using when I go look at my database online it doesn't show my database can anyone help me