I’ve seen many tutorials referring to how to do this locally and the rest of the tutorials are so riddled with mistakes that I was unable to salvage them (none of them referred to doing this with Android).
I’ve seen tutorials for using local DBs with android (that looks pretty simple). I want to be able to read/write to a MySQL DB I have on a server from the app. Before anyone asks: the user will not be entering info in/have access to the data going to the server.
I’m also unsure of what Class.forName I’d be able to use; I know “com.mysql.jdbc.Driver” requires additional drivers (which seems like a bad choice considering I want to use this for android apps).
Any tutorials or advice that would help me accomplish this? Perhaps I’m simply failing to find good tutorials, but so far the tutorials have left me more confused than when I started.
You are failing to find good tutorials because with Android there are no native classes to interact with a MySQL Database (only SQLite). You need a RESTful service to serve up the data using JSON or XML. See this link for a good read on how you might go about doing this.
I recently had a similar requirement except I had to interact with a SQL Server 2008 database. My very naive implementation used ASP.NET MVC to return the JSON. They have recently released a very nice Web API to do just that, without out all of the MVC. See this and this and browse around asp.net for some good information.
Also more good links:
Creating a RESTful API with php
https://stackoverflow.com/questions/238125/best-framework-for-php-and-creation-of-restful-based-web-services
Another PHP restful service example
Whats that you ask? How do you now call these “RESTful” services from Android? Here is a great read.
Also this answer utilizes some of the code from the previous link.