Use android as webserver on local network [closed]

只愿长相守 提交于 2019-12-11 16:53:42

问题


Ive seen some apps where you can open your computers web-browser, type in the local IP address to the android device, and access a homepage that hosts from the device.

An example is this app: Finger Timer - play.google.com

Does anyone know how this is done? Does Google have an API for this, or do you have any examples that I can start with? Im not a professional developer, so I prefer to keep it simple (few technologies).

What I had in mind was something like this:

  • Create a HTML or PHP page on my device
  • Feed it with some information from my app somehow
  • Host that page, so it can be accessed from any web-browser on any device on a local network.

回答1:


" Paw Server" does that.

Here's some documentation on how to use it.

  • check out this thread at XDA-Devs which explains the process. http://forum.xda-developers.com/showthread.php?p=9893301
  • on Google Play
  • PawServer Homepage



回答2:


I found this page that is amazingly good. Just what I was looking for. It even has source code, so this is how I can learn faster. Android Development Blog It contains, as the blogger says: "a bare minimum web server for android platform".



来源:https://stackoverflow.com/questions/13087828/use-android-as-webserver-on-local-network

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!