Greetings! I am trying to connect my android application to a MySQL database. The app serves as a tool for lawyers providing them features such as:

  • a calendar wherein they can add and view events
    -an agenda list wherein they can see a list of their agendas
    -a notification list wherein they can see notifications that they receive on the system
    -a case list wherein they can see their list of cases

I have created a case management system coded in php where most of the main functions are located. The system, however, is not a web application meaning it only uses the local network of the firm. So what ever is done on the system (i.e. adding new cases, creating new events on the calendar, etc) will reflect on the mobile application. The android app will not utilise the Internet. My question is: what would be the best way to connect the android app to the database Ive created on phpmyadmin since both the system and the app will just be on the localhost of the firm? What would be the easiest way to accomplish this task?

Thanks!

You have to use third-party to connect Android with MySQL

To cut a long story short, you don't want to connect to the database directly, you want to build an API that sits in-between. Let the API service talk to the database and communicate with the API via HTTP calls or some other protocol.

Im having the same problem as Pregasan, the iOS app build with no problems, but no data is been loaded into TableView. In the log it Prints "Data Downloaded"...any ideas?

The best way to host any database over a network is to take a step away from the db technology itself, as that should really not be of any concern to the client (app).

I make use of a technology stack that automatically generates and hosts REST API endpoints for any database. So hosting the db is not done directly, but exposed through REST.

Check out the one-click stack deployment of Dreamfactory hosted on Bitnami. All you have to do then to interact with your database is hit the REST API.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.