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

  • SEARCH
  • Home
  • 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 8734279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:48:40+00:00 2026-06-13T09:48:40+00:00

In my Android application I want to use google currency converter. Google currency converter

  • 0

In my Android application I want to use google currency converter. Google currency converter outputs result in a json format like:

{lhs: "1 British pound",rhs: "1.6058 U.S. dollars",error: "",icc: true}

I used following code stub in my Android application to get the output from json

JSONArray jArray = new JSONArray(jsonResult);
JSONObject json_data=null;
String currency01 = "";
String currency02 = "";
for(int i=0;i<jArray.length();i++){
    json_data = jArray.getJSONObject(i);
    c1 = json_data.getString("lhs");
    c2 =json_data.getString("rhs");
    tv.append(c1+"\n\n");
    tv.append(c2);
}

but this doesn’t give any result no errors also. Please help I’m stuck here how to read above json in Andoid.

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-06-13T09:48:42+00:00Added an answer on June 13, 2026 at 9:48 am

    Use this as you are not getting array its json object
    I have tested using url http://www.google.com/ig/calculator?hl=en&q=1GBP=?USD

    String currency01 = "";
    String currency02 = "";
    JSONObject jObj = new JSONObject(jsonResult);
       currency01  = jObj.optString("lhs");
        currency02 =jObj .optString("rhs");
        tv.append(currency01 +"\n\n");
    tv.append(currency02 "\n\n");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i developed android application in normal android2.1, i want to use Google map in
I am developing an Google maps android application in which I want to use
I want to use Google Transit API in Android application. But I am getting
In a Android application I want to use Scanner class to read a list
I want to use an external website http://www.siirretytnumerot.fi/ in my android application. This website
In my android application I use camera to capture photo. I want to print
i want to make a splash screen on my android application, i use phonegap.
I want to use com.google.android.maps.MapView, but can't figure out how to download the library
i'm developing an android application similar to Google places app. I want a functionality
I want to use regex in my android application to validate some field. User

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.