Realm access from incorrect thread

后端 未结 4 2071
青春惊慌失措
青春惊慌失措 2020-12-06 09:35

I have an application with a LoginActivity, that when the user login correctly, I register to receive messages. And the LoginActivity jumps to

4条回答
  •  温柔的废话
    2020-12-06 10:17

    Just create Realm backgroundRealm = Realm.getDefaultInstance() each time you want to access database and don't forget to close it using realm.close()

提交回复
热议问题