草庐IT

OnlineMatch

全部标签

android - 如何使用 Kotlin 从 Firebase 数据库中检索数据?

这是我上传到Firebase的模型:publicclassOnlineMatch{privateUseruser1;privateUseruser2;publicOnlineMatch(UserfirstPlayer,UsersecondPlayer){this.user1=firstPlayer;this.user2=secondPlayer;}}然后我以这种方式(kotlin)将数据发送到Firebase:funcreateMatch(match:OnlineMatch){valmatchList=database.child("multiplayer").push()matchL