android - 在 Android 上托管网络服务

标签 android .net web-services

我只找到了使用 Android 使用 Web 服务的教程。 但我想做的是在 Android 手机上托管 Web 服务,并使用 .Net 应用程序使用此 Web 服务。

有人知道好的教程或类似的东西吗?

最佳答案

你可以使用 i-jetty ,Android 的网络服务器。

还有一些资源可以解决您的问题:

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

然而,根据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.

它还可能耗尽您设备的电池。

希望这能澄清您的疑虑。

关于android - 在 Android 上托管网络服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23655250/

相关文章:

java - 耗时测量问题 - JAVA

android - 将设备中的磁场 X、Y、Z 值转换为全局引用系

Android 和 TextView 中的

java - RGBIR 的 Tango 相机预览

c# - Web 服务中的数据持久性?

java - 如何解决无法找到请求目标的有效证书路径异常?

c# - tcplistener 没有启动

.net - 在一个本该无法到达的地方抛出什么异常是正确的?

Linux 上的 .NET Core - LLDB、SOS 插件 - 诊断内存问题

web-services - 如何在 RESTful Web 服务中使用 mysql 实现基于表单的登录?