문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top