简体   繁体   中英

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.

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. Would a web app be a better idea, compared to native?

Thanks!

Here's a tutorial on making a login screen for an android app that connects to a remote server.

You would probably use a similar post method to send more data to the remote server such as photos and text. Here is a good method of sending images to a server.

Here's a nice method of lazy-loading images in from a URL.

I hope this 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM