我正在研究一个项目,将Android应用流摄像头制作到另一个我使Peerjs Server与HTML和Java网站一起使用的应用我的Android即使我的计算机和电话都在同一wifi上(我看不到client connect in emulator上的同一应用程序),它也不会连接到PEERJS服务器),我什至尝试使用移动热点并连接他们 。
代码正在用来
peer = new peer (userId, {
host: '192.168.91.3',
port: '8000',
path: '/myapp'}
提前连接THX :)
am working on a project to make android app stream camera to another app i made peerjs server to work with html and java website then used webview to use it in the app on the emulator everything is working but the problem is when i install the app on my android it doesn't connect to the peerjs server even when both my computer and phone are on the same wifi ( i don't see client connect like when i use the same app on the emulator ) i even tried using mobile hotspot and connect them .
The code am using to connect
peer = new peer (userId, {
host: '192.168.91.3',
port: '8000',
path: '/myapp'}
Thx in advance :)
发布评论
评论(1)
我遇到了同样的问题,终于找到了解决我的问题的解决方案,我认为您的问题可以通过以下行解决:
android:usecleartexttraffic =“ true”
将其添加到应用程序标签中的subtest.xml中。
我在这两个站点中找到了答案:
,
如何连接到Android 10 的远程服务器
I had the same problem and finally found a solution for my problem and I think your problem can be solved with this line:
android:usesClearTextTraffic="true"
add this to your Manifest.xml in application tag.
I found my answer in this two sites:
https://www.pdftron.com/documentation/android/faq/uses-clear-text-traffic/,
how connect to remote server in android 10