How do you get data from a server via Ruby and then pass this data into Java/Android classes? -
i making simple todo list android application using ruby (specifically activerecord) data database containing users (made of attributes name, emails, todo lists etc). problem want pass user data ruby java/android code (for example load users information after login). similarly, how pass data java/android code ruby, may update users information on database when necessary?
please keep in mind must use ruby.
the basic idea data hitting url on web mobile android app:
you need create web services in ruby return data in different formats json, html, yaml, xml
can parse on mobile app. prefer json/xml formats data easy parse on mobile site.
here go, creating restful api in rails there many tutorials , example available on web below:
tutorials or screencasts on building rest web service on rails
http://pivotallabs.com/building-a-fast-lightweight-rest-service-with-rails-3/
http://railscasts.com/episodes/350-rest-api-versioning
http://gavinmorrice.com/blog/posts/21-building-a-rest-api-in-rails-3
http://codedecoder.wordpress.com/2013/02/21/sample-rest-api-example-in-rails/
Comments
Post a Comment