我的用于从realtimedb提取数据的代码
Log.d("checkFlow","reached here:requesting data")
Firebase.database.getReference("serverloc").addListenerForSingleValueEvent(object :ValueEventListener {
override fun onCancelled(p0: DatabaseError) {}
override fun onDataChange(p0: DataSnapshot) {
Log.d("checkFlow","reached here:got the data")
startActivity(Intent(this@MainActivity, Home::class.java))
finish()
}
})
当我使用移动数据运行此应用程序时
D/checkFlow: reached here:requesting data
当我使用其他网络时
D/checkFlow: reached here:requesting data
D/checkFlow: reached here:got the data
我也尝试了其他设备,结果相同。我的应用程序的许多用户也在说同样的话!