简体   繁体   English

通过Android应用托管本地网页

[英]Host local web page from Android app

I've just started using an app called "wifi file transfer". 我刚刚开始使用一个名为“ wifi文件传输”的应用程序。 The way it works is that you run the app on your phone, the phone hosts a webpage and you can access it from any computer on that network with the phones ip address and the port number. 它的工作方式是在手机上运行该应用程序,该手机托管一个网页,您可以使用该手机的IP地址和端口号从该网络上的任何计算机上访问该网页。

I just want to know how that works, any body know of any tutorials or anywhere I can get started? 我只想知道它是如何工作的,任何机构都知道任何教程或任何可以入门的地方?

EDIT: I'm looking for java code to see how this works, not just another app. 编辑:我正在寻找Java代码以查看其工作原理,而不仅仅是另一个应用程序。

You could give a try to NanoHTTPD . 您可以尝试使用NanoHTTPD It is small, lightweight and easily configurable. 它体积小,重量轻且易于配置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM