0

I created an app that converts certain currencys like Euros to Dollars, so when you enter a cerain amount of Euros it will convert to Dollars when you press a button. But I entered the calculation in the code. So now I was wondering if it is possible to use certain variables from a site and add them in your Android app.

So if the variable changes on the site that they instantly will change in my App.

If this is possible could somebody please explain me how to do this and if it is not possible just comment a no.

Thank you.

  • Use this API https://openexchangerates.org/ to get the exchange rates and perform the conversions – Royce Raju Beena Oct 16 '14 at 08:21
  • I see that this costs money so is there a free way to do this? because I am just a student and the app is just for school so it is not worth paying for it escpecially since it is not gonna go on the playstore EDIT sorry i just noticed the free plan it was really small my bad. thank you for the link – Wouter Sanders Oct 16 '14 at 08:22

2 Answers2

0

Google exchange rate query (parsed)

Request: http://rate-exchange.appspot.com/currency?from=USD&to=EUR
Response:{"to": "EUR", "rate": 0.781107, "from": "USD"}

Here's another JSON(P) API based on the Google API (source: this comment): http://rate-exchange.appspot.com/currency?from=USD&to=EUR&q=1

Royce Raju Beena
  • 711
  • 4
  • 20
  • How do I add this to my code? because of the // in the link it doesnt read the link. – Wouter Sanders Oct 16 '14 at 08:32
  • It's a JSON request . Go through the http://www.vogella.com/tutorials/AndroidJSON/article.html to learn how to parse json requests or consider adding and using the library http://loopj.com/android-async-http/ – Royce Raju Beena Oct 16 '14 at 08:34
0

There are open source api are available like openexchangerates.org and also Yahoo and Google Finance api's are available . Check This SO Answer

Community
  • 1
  • 1
W I Z A R D
  • 1,224
  • 3
  • 17
  • 44