I want to build an app that talks to a database.
Analogy would be the youtube app for example. It connects to a secure host (requires login and password), and then returns to user results based on their query.
What I need the app to do is:
- Get user Login information (preferrably do it in a secure way and not store it unencrypted on the users phone – This is I think easily solved with GetPassword so not worried about this)
- Once user clicks ‘login’ Authenticate the user on my site (no clue at all how to even research how to do this. I know where the source code for the login page from regular browser is but not sure what to do)
- How do I do queries based on who the user is? (for example their email, and other related data).
I would love some specific examples as well as general, and if there is a tutorial for a way to get the phone app talking to a server I would love that as well. Or any other related tutorial for that matter.
You can use HttpPost and HttpGet requests to communicate with a server. HttpGet sends parameters in the url (ex: http://mysite.com/index.html?username=admin&password=cleartext). That is obviously not the preferred method for secure information. The HttpPost sends the data in a packet which is encrypted using https. Here’s an example of sending user entered data to a web page.
To use a secure connection, just change the web url to https://www.mywebsite.com/login.php.