Question

I've only found tutorials to consume a web service with Android. But what I want to do, is to host a web service on a Android phone and consume this web service with a .Net application.

Does someone know a good tutorial or something like this?

Was it helpful?

Solution

You could use i-jetty, a webserver for android.

Also there are some resources for your question:

  1. RESTful Web Services Implementations in Mobile Devices
  2. Android - Create RESTful WebService - Host it on mobile

However, according to this answer:

...mobile networks (wifi and 3g) mostly use NAT, which prevents inbound connections. This makes mobile devices inaccessible from the internet (inbound) while they can still initiate outbound connections. For this reason mobile devices mostly do not host servers.

It could also drain your device's battery.

Hope this clarifies your doubts.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top