2

I actually posted this question because I found similar questions but not a perfect answer. So coming to my question, I would like to access a database from server. As I'm new to android, I don't know what to do. Can anyone please help me what should the steps to be taken. I've already gone through many sites and found some answers like by using soap or restful services we can do this. But my actual problem is webservice. How to create a webservice or what is the coding of webservice to handle requests from android and also can someone post some sort of sample code to access this external database(insert, update and delete).

Please reply as soon as possible.

Thanks in advance

1 Answer 1

2

Don't think webservices are too much complicated. You can write webserivces using any language. In my case we have developed a php script as webservie which reads data from mysql and sends as Json object. Using HttpClient API we can invoke this php webservice and parse the Json object. Here is nice step by step tutorial on how to achieve this.

access mysql data using php and httpclient Update and inserts also follows sequence, but you will post data to php script which will update the mysql database.

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

Comments

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.