leonardo
leonardo

Reputation: 41

Data exchange between android app and web service

I have an Android app with some data (consisting in latitude and longitude) and a RAILS web service with a MySQL database... I want to know how to send this data to my database

Upvotes: 0

Views: 1376

Answers (3)

Senthil Mg
Senthil Mg

Reputation: 3313

You need an web server with logic implementation to accept/update/delete data from mysql server either by using Java/PHP etc...You need to specify internet permission in your manifest file. And follow the link below for more detail how to make PHP server sends data to an Android device

Upvotes: 1

Infinity
Infinity

Reputation: 3875

Make a REST post/put call to your webservice.You can use Android httpclient to make a connection. The api is available here

http://developer.android.com/reference/android/net/http/AndroidHttpClient.html

As always, don't forget to turn on your internet permission and perform your network tasking within AsyncTask or another thread to prevent UI thread blocking.

Upvotes: 0

Ragunath Jawahar
Ragunath Jawahar

Reputation: 19723

Rails exposes REST APIs that you can use to send data to your server. There should be an api that accepts post requests and updates the data on your web application's database. Ask your rails developer for the url.

Upvotes: 0

Related Questions