【发布时间】:2017-05-07 06:39:09
【问题描述】:
我正在使用 Firebase 制作一个示例笔记应用程序,用户可以在其中登录并创建简单的文本笔记。 我的 Firebase 数据结构如下:
"Project-dir":{
"Notes":{
"UserID":{
"NoteKey":{
"title":"This is note title",
"content":"This is the note content",
"unixTime":123456789
},
"NoteKey":{
"title":"This is note title",
"content":"This is the note content",
"unixTime":123456789
},
}
}
}
它在用户登录时工作正常。 但是,我想添加“不登录继续”功能。我使用 push() 生成了唯一的用户 ID,而不是 auth UID,并存储在 sharedprefs 中。 但是,当他决定稍后登录时,如何将所有这些笔记迁移到用户的 UserID(UID)?
【问题讨论】:
标签: android firebase firebase-realtime-database firebase-authentication