简体   繁体   English

如何在Android中向远程服务器验证用户身份?

[英]How to authenticate a user to a remote server in Android?

I've been making stand-alone Android apps for some time now, but I now want to make an app that requires authentication and have no idea where to start. 我已经制作独立的Android应用程序已有一段时间了,但是现在我想制作一个需要身份验证并且不知道从哪里开始的应用程序。

For example I would need to do the following: 例如,我需要执行以下操作:

  1. Allow a user to create a new account, which would be stored in a remote server. 允许用户创建一个新帐户,该帐户将存储在远程服务器中。
  2. The user can log in to his account, and create journal-like entries (photos + text) which would be stored in the remote server. 用户可以登录到他的帐户,并创建将存储在远程服务器中的类似日记的条目(照片+文本)。
  3. The user's previous entries would be downloaded when he logs in. 用户的先前条目将在登录时下载。

Can you point me in the right direction? 你能为我指出正确的方向吗?

I already know how to do all this in plain'ol HTML/PHP. 我已经知道如何在纯HTML / PHP中执行所有这些操作。 Would a web app be a better idea, compared to native? 与本机相比,Web应用程序会是一个更好的主意吗?

Thanks! 谢谢!

Here's a tutorial on making a login screen for an android app that connects to a remote server. 这是有关为连接到远程服务器的android应用创建登录屏幕教程

You would probably use a similar post method to send more data to the remote server such as photos and text. 您可能会使用类似的post方法将更多数据(例如照片和文本)发送到远程服务器。 Here is a good method of sending images to a server. 这是将图像发送到服务器的好方法。

Here's a nice method of lazy-loading images in from a URL. 这是一种从URL延迟加载图像的好方法

I hope this pointed you in the right direction ! 希望这为pointed you in the right direction


Personally, I would prefer a web-app, because what you're making is heavily web-based, and by making an app only on android, you are shutting out users with other smartphones that would be able to use a web-app. 就个人而言,我更喜欢使用Web应用程序,因为您制作的内容很大程度上基于Web,并且通过仅在android上制作应用程序,您将用户与其他能够使用Web应用程序的智能手机隔离开来。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Android上对用户进行身份验证,但在远程服务器上进行处理? - authenticate the user on Android but process on remote server? 如何在Android上验证用户身份? - How to authenticate user on android? 如何在没有后端服务器的 Android 应用程序中为 PhotosLibraryClient 验证用户 - How do you authenticate a user for PhotosLibraryClient in an Android app with no backend server 应用到服务器的安全性:如何验证服务器上的Android应用/用户? - App to server security: How can I authenticate an Android app/user on my server? 如何通过Android中的Web服务对用户进行身份验证? - How to authenticate an user through webservices in android? 如何在wordpress中验证用户[通过android] - How to authenticate a user in wordpress [via android] 如何验证用户? (Android / Java / Symfony) - How to authenticate user ? (Android/Java/Symfony) 如何在Android的Uber SDK中对用户进行身份验证? - How to authenticate user in Uber SDK in Android? 如何验证Android Google使用Node服务器登录 - How to authenticate Android Google sign in with Node server 使用Android帐户管理器验证在我的服务器上使用FB登录的用户 - Authenticate user logged in with FB at my server using the Android Account Manager
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM