Getting Android to access a simple MySQL database
Posted on 2013-01-18
I have a MySQL database sitting behind a website that I own. What I want to do is create an Android app (for personal use only) which works as follows:
1. One screen with two buttons, A and B. No special graphics.
2. If you press button A, it accesses a table called 'countries' in the database and shows a screen of all columns in that table, of the rows where the 'country_initial' column contains an A.
3. If you press button B, it accesses the table called 'countries' and shows a screen of all columns in that table, of the rows where the 'country_initial' column contains a B.
I have full access to the database. The only table in the database I'm interested here is 'countries'.
I have been trying to work out how to do this (I know the basics of Java and have been fiddling about with the Android SDK but don't seem to be getting anywhere). It seems like a very simple thing to do, so if anyone can help me out (or point me to a tutorial that would help me with this) I'd be very grateful.
The simpler I can make it the better as I intend to learn how to do more complicated stuff from this example. Thanks.