6

How do I do remote API call in Android Apps using Phonegap???

Surya
  • 439
  • 3
  • 9
  • 31

2 Answers2

5

Just use XmlHttpReqquest to communicate with your server. Here is my stock example that gets a list of tweets from Twitter:

http://simonmacdonald.blogspot.com/2011/12/on-third-day-of-phonegapping-getting.html

Simon MacDonald
  • 23,253
  • 5
  • 58
  • 74
0

If you use PhoneGap in combination with jQuery Mobile you can use the Ajax function of jQuery. Simply pass the url and use the succes or error callback to edit or use returned data.

Aidan
  • 118
  • 1
  • 11
  • It might be easier to use the solution @SimonMacDonald mentioned. If you use my solution you need to add libraries to your project that might be unnecessary for the rest of the application. – Aidan Feb 28 '12 at 08:38