Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How can I connect my android app with mysql to use centralized storage? I want to do this in web android app not native one.

I have an android app that uses the offline storage SQLite and HTML5 storage, and want to connect it also with my centralized storage on Mysql when the internet connection established so i can synchronized the data between SQLite and Mysql. My app is a web mobile app, i am using html5, jquery mobile and my own plugin to produce the apk file. Thanks alot.

user-image
Question added by Aya Taleb , Senior Web Developer / Team Leader , Bayt.com / Talentera
Date Posted: 2013/09/16

As Asif said, you can build a web services that communicates with the database and pass data to your application using json. This tutorial might give you some ideas:

How To Write A Simple PHP/MySQL Web Service

If you are creating a native app, it could be easier to use a backend provider such as Amazon Web Services of Windows Azure Mobile Services which make it very easy to create a scalable backend system in minutes. 

Asif Javed
by Asif Javed , Software Engineer – [Mobile (Android, iPhone, Blackberry & WP 8), Web Developer] & SEO Expert , MetiCode [Pvt].LTD

Aoa,

 

Thanks for your patience,

 

Use web services for this problem by json technology.

 

If you further requires help in this regards please feel free to ask.

 

Thanks,

 

Asif Javed

Akram Wahid
by Akram Wahid , Senior Web Developer , Jaber Bin Ali Group

 you can build a web services that communicates with the remote database from your android application.

normally process go like this

ANDROID APPLICATION -----> PHP FILE ----> REMOTE DATABASE

for this you can try RESTFUL Web service.  for more info go to follwing url.

http://stackoverflow.com/questions//how-implement-restful-services-in-android

Ron Fredrick Del Rosario
by Ron Fredrick Del Rosario , Chief Technical Officer , Netaq Soft for Electronic Solutions

JSON is the way to go. All of the major social networks use the same patterns for creating and consuming data.

Mo'ath Al Mallahi
by Mo'ath Al Mallahi , Senior PHP Developer , iHorizons

You can make a simple WEB SERVICE, which will recieve the request and compare with the online DB and sends the result.

you can read more here

Mahesh Subudhi
by Mahesh Subudhi , Software developer , Thoughtspheres Technology Pvt Ltd.

Use MySQL in server side to store your DB by using  PHP or  .Net by using Json technology

U can find many example.

 

Robert Bautista
by Robert Bautista , Interactive Development Manager , O Communications Group

A simple web service (php or .net) will do the trick. Just manage the security settings when passing data from mobile to central database servers. Cheers!

Eslam Gamal
by Eslam Gamal , MIS Executive - Credit Risk , QIB

i use basic4android it can connect direcly to remote MySql databases , sql server etc ...

Check it out 

http://www.basic4ppc.com/android/forum/threads/remote-database-connector-connect-to-any-remote-db.31540/

Amr Ahmed Elghadban
by Amr Ahmed Elghadban , Projects Lead , Seddiqi Holding

 the easy way is to provide rest API  using php/ servlet or any web language  to access ur data  and mobile can hit   them via http request  

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.