• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How to connect Android app to MySQL database?

  1. I have a website already setup which uses MySql database. I want to know how can i connect my app to that database.

    My app should make a request to find a table of a defined "ID" . The table contain some data. I want the app to retrieve those data and display them on the android app.

    What are the ways this can be done?

    Can I use JDBC to connect database ..?
    Can I use Webservices using java to do so.. ?

    Please Help
 
The way to do this is to implement a REST web service on your server which hosts the MySql database. The web service will handle requests for data, interrogate the database, and return the results back to your Android app.

See the link below for some pointers, and other useful links. There's plenty of other useful resources on the web about this:

https://stackoverflow.com/questions/14446260/how-implement-restful-services-in-android
 
Back
Top Bottom