I'm working on the application using Firebase Realtime database. App is live but I see problem with users that they don't want to login (so I'm losing a lot of users because one of first screens is login screen).
我正在使用Firebase实时数据库开发应用程序。应用程序是实时的,但是我看到用户不愿意登录的问题(所以我失去了很多用户,因为第一个屏幕就是登录屏幕)。
I'm thinking to update my app to be able to work without login and when user decides to authenticate then I would send his/her data into cloud and continue working as usually.
我正在考虑更新我的应用程序,让它不用登录就能工作,当用户决定进行身份验证时,我将把他/她的数据发送到云,并继续正常工作。
What is (on your opinion) best approach? Should I create JSON nodes something like sessions_unauthed
with random uuis for not logged users and sessions
for logged users. And move data from one subtree to another when user login?
(你认为)最好的方法是什么?我是否应该为未登录的用户创建像sessions_unauthed这样的JSON节点,为已登录的用户创建会话。当用户登录时,将数据从一个子树移动到另一个子树?
1 个解决方案
#1
1
what you can do is that you can use anonymous login function of firebase and storing that uid to sharedpreferences and then moving those nodes to the newly logged in user's uid nodes.
您可以使用firebase的匿名登录函数并将uid存储到sharedpreferences,然后将这些节点移动到新登录的用户uid节点。
Hope this helps
希望这有助于
#1
1
what you can do is that you can use anonymous login function of firebase and storing that uid to sharedpreferences and then moving those nodes to the newly logged in user's uid nodes.
您可以使用firebase的匿名登录函数并将uid存储到sharedpreferences,然后将这些节点移动到新登录的用户uid节点。
Hope this helps
希望这有助于