I'm developing a web app using webSockets for network communication, it works fine when I'm using the browser on a computer, but when I use it from a smart phone, nothing! even the server doesn't receive any connection. I've tried socket.io and ws and i get the same behavior. What can be the problem ?
Additional info:
I'm running the web app on my local Windows 7 computer using Apache as a web server, and I have NodeJS also running separately on different port than Apache.
Accessing the web app through my smartphone using wifi lan and IP address of my computer.
The smartphone has android kitkat 4.4.2
Related
How can I allow my application to access mobile camera when trying to access http://ip-address:8080 from my mobile phone.
Side note: It works fine when I run it on my computer where application is running.
Try to run it on server. Because your browser can block some operations on localhost to make your privacy better.
I deployed this on heroku server and it responded properly
The getUserMedia() is only allow on secure (https) connections or localhost.
This is why it does work on your pc in localhost.
If you want to access your application by the ip on your phone you must enable https on your application to use your camera/microphone.
I am currently trying to develop a PWA, however, I can't work out how to get it hosted over the local network? It works fine when connecting to localhost from the host machine but will not connect from any other devices on the local network. I believe it might be to do with the fact that the PWA is served over HTTPS and I have tried setting up Open SSL but I'm not too sure whether this is actually the correct idea to get it served over the local network? Thanks in advance.
I mostly use two options:
a) Chrome Remote Debugging + Port Forwarding: This will allow you to port forward your website to your mobile device
b) Netlify Dev: This will give you a temporary URL with https you can use to access from mobile device
I am developing a web app, that needs to run on android mobile device's browser and, communicate with a mobile app which is installed on that device.
The web app need to communicate through ajax calls to localhost (to the android mobile device) to retrieve data from the mobile app.
So far I tried fetching from: http://localhost, http://127.0.0.1, http://10.0.2.2 and none of them worked.
I succeeded only by getting the device IP using webRTC and fetching from this IP.
Is there another way to do this?
If I understand correctly you are trying to inspect development on your android device, you need to use Google Chrome, just open localhost on your mobile device and connect via usb to your computer, then use the remote device tool.
Follow the tool link: https://developers.google.com/web/tools/chrome-devtools/remote-debugging
If you're on the same network you can use your internal IP address. If you're using windows you can use ipconfig and if you're a MAC user you can use ifconfig.
After you found your internal IP address append the port number that your server is running on internalipaddress:port and start making requests there.
I have build my first web application following the code labs example "Your First Progressive Web App"
https://developers.google.com/web/fundamentals/codelabs/your-first-pwapp/
Everything works well, but when I try to access the web server from my mobile device through the local network, I can not see the web app open in my android device.
I have checked the web server IP(192.168.0.161:8887) and my android device IP(192.168.0.231) are in the same local network; also I have selected "accessible on local network" in chrome web server.
Could you please tell what are the possible reasons cause this issue?
Thanks
This is a firewall issue. When I turn off the firewall, I can access the web server from my android phone.
Thanks!
How can i testing my Meteor app in mobile browser?
Like BrowserSync with the address ip.
ant45de is correct. This is exactly what I do when wanting to view the WEB version of my app on my mobile phones browser.
First, find your local ip:
Windows: http://www.bobborst.com/tools/whatsmyip/
Mac/Linx: http://osxdaily.com/2010/11/21/find-ip-address-mac/
Make sure you are on the same wifi network on your phone and your mac.
Go to your phone and type in your ip + :3000, e.g. 192.168.1.5:3000.
Ta da.