Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7059607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:15:08+00:00 2026-05-28T04:15:08+00:00

I need to provide an RESTful api to be developed in ruby on rails

  • 0

I need to provide an RESTful api to be developed in ruby on rails with CRUD features for an android app. I haven’t worked with mobile phone OS(android/iphone) integration with RoR earlier. So, please help me getting started.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:15:09+00:00Added an answer on May 28, 2026 at 4:15 am

    you can send the data as Json packets to the device and in device parse the json packets and access the data. your calls to webservice should be a http call eg this is for the client.

    http:\server\metnod\get_somedata?name=something

    and the server should query the database for this parameter and send you the reponse as Json. parse json and get your details.

    String url = "http:\\example.com\mycontroller\get_employee?id=2"
    
    HttpPost httpPostRequest = new HttpPost(url);
        StringEntity se;
        se = new StringEntity(jsonObjSend.toString());
    
    
        httpPostRequest.setEntity(se);
        httpPostRequest.setHeader("Authorization", usercredential);
        httpPostRequest.setHeader("Accept", "application/json");
        httpPostRequest.setHeader("Content-type", "application/json");
    
        long t = System.currentTimeMillis();
        response = (HttpResponse) httpclient.execute(httpPostRequest);
        Log.i(TAG, "HTTPResponse received in [" + (System.currentTimeMillis()-t) + "ms]");
    
        HttpEntity entity = response.getEntity();
    
        if (entity != null) {
    
            InputStream instream = entity.getContent();
            Header contentEncoding = response.getFirstHeader("Content-Encoding");
            if (contentEncoding != null && contentEncoding.getValue().equalsIgnoreCase("gzip")) {
                instream = new GZIPInputStream(instream);
            }
    
            // convert content stream to a String
            String resultString= convertStreamToString(instream);
            Log.v(null, "resultString "+resultString);
            instream.close();
    
    
            // Transform the String into a JSONObject
            if(resultString!=null){
                jsonObjRecv = new JSONObject(resultString);
    
            }
    
            // Raw DEBUG output of our received JSON object:
            Log.i(TAG,"<jsonobject>\n"+jsonObjRecv.toString()+"\n</jsonobject>");
    
            return jsonObjRecv;
    

    In the server side you should have a get_employee method in a controller called mycontroller. in the method you can process the request as a normal http request and send the response as json eg

    employee = Employee.find_by_id(params[:id])
      @js_response = ActiveSupport::JSON.encode(employee)
    respond_to do |format|
      format.json { render :json => @js_response} 
      format.html
    end
    

    for CRUD you need to create different methods with appropriate parameters like delete_employee, update_employee etc. refer json.org to create/parse json in android

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to provide some passwords, API keys and similar sensitive data in my
I'm currently writing an app in Python and need to provide localization for it.
i need to provide pdf reading in my site, but i haven't done such
I am designing an RESTful API for our product and have encountered the need
I need to provide secure wiping function in windows mobile with following details: All
I implemented a standard Rails (and RESTful) process to CRUD an object. The only
I need to provide a window on an ASP.NET MVC web page where registered
I need to provide email sending and receiving capabilities within my java web-application. Think
I need to provide our web developers an easy and quick way to test
Background: I need to provide a weekly report package for my sales staff. This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.