kotlin

Firebase android works on the emulator but not on the device

久未见 提交于 2020-08-27 19:51:28
问题 I am new to android and I was able to setup the firebase for my app in kotlin. If i run the app in the Nexus 5X API 27 emulator I am able to get the database but when i run the app in the actual device SAMSUNG S5 (Google play Services V 12.5.29, android V 5.0) i don't get the addValueEventListener call back. ref = FirebaseDatabase.getInstance().reference ref!!.addValueEventListener(object : ValueEventListener { override fun onCancelled(p0: DatabaseError?) { Log.d("firebase", "cancelled") }