Reputation: 41
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
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
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
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