2

Okay, I am developing an Application which requires getting sensitive information from a database and displaying it on an Android device. I have set up a HTTPS connection to the webserver, and used a HTTP GET request to a PHP script on the server. The PHP script connects to the database and prints the appropriate data from the database onto the page. My application then reads the contents of that page and displays it.

Is this an appropriate way to access and retrieve sensitive information, or should I use another method?

Many thanks.

3
  • Looks perfectly OK, as long as you don't have DIGINOTAR certificates ;-) Commented Feb 21, 2012 at 17:50
  • Why are you not using application (Android activity) to display sensitive data? In application, you will have better control over your data and presentation of that data. Commented Feb 21, 2012 at 18:12
  • I am using an Activity with an TextView widget to display the contents. Commented Feb 21, 2012 at 18:34

1 Answer 1

1

This is a perfectly reasonable way of fetching the data from the server however to add security you may want to consider changing it to a POST request and then adding a variable that acts as a password that only the server and the client app 'knows'. Therefore other users cannot request the page and find out the sensitive information. An alternative option would be to used OAuth.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks! I appreciate the comment. I was considering using POST instead. I'll look into it.
Yep, this is a mild form of a web service. This is how most people interface with an external database. Just be careful and clean all incoming parameters, etc, into your web service.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.