I am developing android app in meteor. Now I want to store logged in users data. Whats the best way to store logged in users data. I checked session
and local storage
values are changed once the app is closed.
我正在开发meteor中的android应用程序。现在我想存储登录的用户数据。什么是存储登录用户数据的最佳方式。我检查了会话,并在应用关闭后更改了本地存储值。
4 个解决方案
#1
I think you have a bug somewhere, local storage is supposed to be persistent. Check this stack question.
我认为你在某个地方有一个bug,本地存储应该是持久的。检查这个堆栈问题。
Session is not supposed to be persistent, it's just a terrible and confusing name. There's a package to make it persistent.
会话不应该是持久性的,它只是一个可怕且令人困惑的名称。有一个包使其持久化。
You can use Web Storage, it's well supported on decent browsers. Chrome has a decent article on this.
您可以使用Web Storage,它在不错的浏览器上得到很好的支持。 Chrome有一篇不错的文章。
#2
Not much offline storage options in Meteor as of now. Best tool so far is probably GroundDB
目前Meteor中没有多少离线存储选项。到目前为止,最好的工具可能是GroundDB
#3
Why not using a Collection to store that infos and use that collection throught GroundDb meteor package ? it will store everything into localStorage and will use it when the app is offLine. It can also re-sync data from the collection when connection is back.
为什么不使用Collection存储该信息并通过GroundDb meteor包使用该集合?它会将所有内容存储到localStorage中,并在应用程序离线时使用它。它还可以在连接恢复时重新同步集合中的数据。
Here is the link : GroundDb on atmosphere
这是链接:大气的GroundDb
#4
Here's a working example repo and blog write up by Rafael Quintanilha
这是Rafael Quintanilha撰写的一个工作示例回购和博客
#1
I think you have a bug somewhere, local storage is supposed to be persistent. Check this stack question.
我认为你在某个地方有一个bug,本地存储应该是持久的。检查这个堆栈问题。
Session is not supposed to be persistent, it's just a terrible and confusing name. There's a package to make it persistent.
会话不应该是持久性的,它只是一个可怕且令人困惑的名称。有一个包使其持久化。
You can use Web Storage, it's well supported on decent browsers. Chrome has a decent article on this.
您可以使用Web Storage,它在不错的浏览器上得到很好的支持。 Chrome有一篇不错的文章。
#2
Not much offline storage options in Meteor as of now. Best tool so far is probably GroundDB
目前Meteor中没有多少离线存储选项。到目前为止,最好的工具可能是GroundDB
#3
Why not using a Collection to store that infos and use that collection throught GroundDb meteor package ? it will store everything into localStorage and will use it when the app is offLine. It can also re-sync data from the collection when connection is back.
为什么不使用Collection存储该信息并通过GroundDb meteor包使用该集合?它会将所有内容存储到localStorage中,并在应用程序离线时使用它。它还可以在连接恢复时重新同步集合中的数据。
Here is the link : GroundDb on atmosphere
这是链接:大气的GroundDb
#4
Here's a working example repo and blog write up by Rafael Quintanilha
这是Rafael Quintanilha撰写的一个工作示例回购和博客