I am writing an application for my third year project. The application will require interaction with an external mySQL database. The application will retrieve data from the
You need to have a web hosting to store a script online. You can write this script in e.g. php to insert user data in the database. In your app use Volley to take care of the script. Once you get the user data, call the script and listen to the result:
Example
Yes you have to create Web Service to interact with External Database (MySql in your case). Its very easy to create Web service in PHP as its having one function which convert your DB data to JSON and you can easily parse the JSON data and display that in Listview or accordingly your requirement.
Here are some useful link which will help you to get more details :-
http://www.androidhive.info/2012/05/how-to-connect-android-with-php-mysql/ - Best from All
http://www.coderzheaven.com/2011/04/08/android-phpmysql-connection/
http://blog.sptechnolab.com/2011/02/10/android/android-connecting-to-mysql-using-php/
Hope it helps.
This link is surely very helpful. Follow this link completely, but make sure you do the following changes to the httpd.config
file of your WAMP server as stated by this link
Will it involve me having to write a web service to handle the transactions?
Yes, if the database is not on the device, you will have to access it with network requests, which will have to handled by something.
what would that involve?
That depends on a lot of things. You can write a web service in pretty much any language you want as long as the server hosting it supports it. You could you Python, Ruby, PHP, Perl, Java, or .NET (if you have the framework) to name a few. Handling the actual database requests would have to be done on the server, which would return data back to your app - probably as JSON.
I would recommend that your android application talks to a restful service (intermediary service that is talking to your database) that will return the database objects you require. so its not a direct connection to a database but its a good example on this type of connectivity.