在 app 内启动一个本地的 http 服务器,指定一个端口,然后用 webview 可以访问 http://127.0.0.1:port 吗
在 app 内启动一个本地的 http 服务器,指定一个端口,然后用 webview 可以访问 http://127.0.0.1:port 吗
|
GuaidaodlApr 23, 2018
1
可以啊. 搜索了一下, 有一个库叫 AndroidAsync: https://github.com/koush/AndroidAsync
|
|
zj299792458Apr 23, 2018 via iPhone
2
只能用应用内的 webview 访问,最小化之后 ios 只有几十秒后台,别的应用就访问不了了
|
|
vccApr 23, 2018 via Android
3
nanohttp?
|
|
WordTianApr 23, 2018 via Android
4
安卓可以,有些本地的 h5 页面就这么干,然后用 webview 显示
iOS 不知道 |
|
qfpZ2KhNsF23UGbNApr 23, 2018
5
Android 可以,iOS 不了解
|
|
yxjxxApr 23, 2018
6
iOS 也是可以的
|
|
STRRLApr 24, 2018 via Android
7
安卓可以 比如说各文件管理器的 WiFi 传文件
|
|
urmyfaithApr 24, 2018
8
Both Android and iOS can to it.
* https://github.com/robbiehanson/CocoaHTTPServer * https://github.com/piotrpolak/android-http-server * https://github.com/koush/AndroidAsync |
|
AlisaDestinyApr 24, 2018
9
termux 了解一下,把手机( Android )变成 Linux 系统,干啥都可以。
|
|
hongshaoyuancnApr 24, 2018
10
|
|
RockOrRollApr 24, 2018 via iPhone
11
我就用 termux 加 python 在手机上起了个服务
|
|
TelegramApr 24, 2018 via iPhone
12
ios 也可以,比如小火箭配置那里,就有这个功能
|