How to call ASP.Net Web API service from Android?

In my previous posts, I discussed how we can consume the ASP.Net Web API with RestSharp and HttpClient. In this small one, I would like to show how we can make a demo application in Android consuming ASP.Net Web API service. To save time, I already prepare a sample REST web service made by ASP.NET Web API with only one resource at http://restwebserviceforandroid.apphb.com/api/products. You can access the service without any authentication for your testing purposes. On the server, I use Entity Framework to connect to a SQL Server behind with following structure

Continue reading How to call ASP.Net Web API service from Android?

How to get Android emulator working with Fiddler?

If you are trying to call web service within Android emulator, maybe you would like to see how your real HTTP request looks like and was sent to server. Of course there are a lot of ways to hook network interface such as using Wireshark, Microsoft Network Monitor,… However these tools provide low-level-interfaces with packet capturing which aren’t appropriate for TCP/IP data analyzing. Therefore, in this small blog post, I’ll summarize how to configure Fiddler so that he can capture all traffic going through Android emulator. Fiddler can parse JSON/XML format in readable form so that we can validate input/output data in HTTP request.

Continue reading How to get Android emulator working with Fiddler?