I have used Firebase for 2 years, and suddenly it stopped receiving any data from the emulator, but at the same time, it receives from an actual device !!!
My Code:
val database =Firebase.database
val myRef = database.getReference("message")
uploadButton.setOnClickListener {
myRef.setValue("Hello, World!")
}
What I have tried
- Used multiple different emulators (those with google play) with different SDK
- Changed
SHA1
andgoogle-services.json
- In Settings -> Appearance & Behavior -> SDK Tools downloaded and activated Google play service
- Reinstalled Android Studio
- Installed Windows 10 again
- Updated Google Play services version
- Tried different projects on different firebase accounts
- Activated Sign-in methods in the firebase console
- Upgraded billing plan in firebase
- Disabled the firewall
- Disabled the anti-virus
- I opened all the ports
- Searched the web for several days and did many other things I can't even remember now