Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Consuming WebServices in Android

 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A few questions..

1. How to consume a web service in Android? Any pointers or link to simple tutorials would be useful.
2. Since there are performance issues associated with web services - what special care needs to be taken when using them in Android applications?


Thanks.





 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. How to consume a web service in Android? Any pointers or link to simple tutorials would be useful.

At the easiest, web services can be called using the HttpURLConnection class. If that's available (check the Java API implemented by Android), then you can call web services.

2. Since there are performance issues associated with web services - what special care needs to be taken when using them in Android applications?[/qupte]
What kind of performance issues are talking about? How would those affect the client?
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for replying UD

Android APIs does have HttpURLConnection class but I am having problem using it because of proxy and firewall settings.

By performance I meant speed; are there ways to improve the response times?

Thanks.
 
Mark L. Murphy
Author
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By performance I meant speed; are there ways to improve the response times?


Nothing particular to Android. Obviously, there are many many ways of improving performance of Web services and their consumption, but those are mostly Web service-related issues (e.g., using If-Modified-Since).

You might also consider using the Apache HttpClient API, available in Android. I tend to use that instead of URLConnection.
 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HttpClient on Android
I just happened to come across this today. It is a pretty good introduction to using the Apache HttpClient on Android.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic