在Android中保存用户数据的最佳方式是什么?

时间:2021-08-17 15:48:40

I want to add user authorize system in my Android application. At first glance it looks very easy, however; when I start to research, I encountered too many problems. Because every person can download my apk file and can see my auth system code and can send HTTP POST requests from anywhere.

我想在我的Android应用程序中添加用户授权系统。乍一看,它看起来很容易;当我开始研究时,我遇到了太多问题。因为每个人都可以下载我的apk文件,并可以看到我的身份验证系统代码,并可以从任何地方发送HTTP POST请求。

Firstly I founded that link below

首先,我在下面创建了这个链接

http://android-developers.blogspot.in/2013/01/verifying-back-end-calls-from-android.html

It was looked me very complex and I thought that there can be more simple ways that can be fee.

这看起来非常复杂,我认为可以采用更简单的方式付费。

I tried to use Amazon Cognito and completed all login protocols using facebook and google+. Finally I encountered a big frustrating problem. If user would use different login system in different devices, Cognito can not understand that are the same user. I asked this problem in Cognito forums and their offical answer is below.

我尝试使用Amazon Cognito并使用facebook和google +完成所有登录协议。最后我遇到了一个令人沮丧的问题。如果用户在不同设备中使用不同的登录系统,则Cognito无法理解同一用户。我在Cognito论坛上问了这个问题,他们的官方答案如下。

We use tokens issued by providers to determine identity. If you login using Facebook on one device and you use Google on another device, there is no way for us to determine that these tokens belong to the same user

我们使用提供商发布的令牌来确定身份。如果您在一台设备上使用Facebook登录而在另一台设备上使用Google,则我们无法确定这些令牌属于同一用户

then I decided to use Google Cloud mobile Solutions but I learned that It is banned in China mainland which My app will also be Chinese.

然后我决定使用谷歌云移动解决方案,但我了解到它在*被禁止,我的应用程序也将是中文。

parse.com is very slightly but It does not have Google plus login.

parse.com非常轻微但它没有Google plus登录。

I haven't only tried Microsoft Azure because Its documentations are very confusing. But If I can be sure that It compeletely works, I would learn everything about Azure.

我不仅尝试过Microsoft Azure,因为它的文档非常混乱。但是如果我能确定它能够正常运行,那么我将学习Azure的一切。

I am enhuaist to search the best suitable way save my users data on remote server. What is your suggestions ? Which way should I follow ?

我很乐意在远程服务器上搜索保存用户数据的最佳方式。你有什么建议吗?我应该遵循哪种方式?

Thank you.

1 个解决方案

#1


Why is Cognito not working for you? There is no identity provider who will ever be able to tell a Facebook user and a Google+ user are the same person. They are completely separate platforms. With Cognito, if a user logs in to both Google+ and Facebook on the same device, then it will know they are the same person. Amazon SNS (Mobile push) can also push to Chinese devices.

为什么Cognito不适合你?没有身份提供者可以告诉Facebook用户和Google+用户是同一个人。它们是完全独立的平台。使用Cognito,如果用户在同一设备上登录Google+和Facebook,则会知道他们是同一个人。亚马逊SNS(移动推送)也可以推送到中国设备。

#1


Why is Cognito not working for you? There is no identity provider who will ever be able to tell a Facebook user and a Google+ user are the same person. They are completely separate platforms. With Cognito, if a user logs in to both Google+ and Facebook on the same device, then it will know they are the same person. Amazon SNS (Mobile push) can also push to Chinese devices.

为什么Cognito不适合你?没有身份提供者可以告诉Facebook用户和Google+用户是同一个人。它们是完全独立的平台。使用Cognito,如果用户在同一设备上登录Google+和Facebook,则会知道他们是同一个人。亚马逊SNS(移动推送)也可以推送到中国设备。