Reputation: 1411
I need some help with connecting my mySQL database to my Android app I'm currently developing.
I've never done this before, and I found a couple tutorials here it provides good information and I understand most of it, but it doesn't entirely work with my situation.
I have a database stored on a remote server my university provides and I access it using phpMyAdmin.
I need help connecting the app to the database so that way when users log in and registers for the app, it stores on the mySQL database. I was told I may need to use an SSH tunnel I have?
I've never done that before so I'm not too knowledgeable with that. Thanks guys!
UPDATE:I like the responses guys, thank you, I'm completely new to this so I'm learning as I go here. I do not know what the rest api is or how to implement it, it sounds like I need that. Also I do not just need log in verification, I need the app to add new users into the database as well in the registration screen.
Upvotes: 1
Views: 9233
Reputation: 2521
It would be done through Webservices. You need to develop web service and expose that webservice in android project.
That what is done in link you have given.
http://webdesignergeeks.com/mobile/android/android-login-authentication-with-remote-db/
they have created webservice in php and call that webservice to authenticate username and password.
Upvotes: 1
Reputation: 15758
better develope a server-side module which caters your db needs , and access it using HTTP requests from android app.
you need.
1) One web-application (probably exposing REST api)
2) above web-application, connecting to mysql using jdbc
3) http client framework in your android app (client)
Upvotes: 0