What development server you are using?Thank's for the clarification
first I test my file in browser before
http://127.0.0.1 is ok
http:// ipv4
Hmmm… can't reach this page
You mean you can't even open http://192.168.2.235 from your PC?192.168.2.235
Thank you for the clarification. I have read and watched the posts before and tried, but I still did not find the wayHttpJob not connecting to Localhost
I have a weird error and hope someone can point me in the right direction. I have a backend API which I am running on localhost for Dev purposes. The API works perfectly when I test it using Postman. It also used to also work perfectly when I was using B4A. Unfortunately, it just stopped...www.b4x.com
I want access to localhost on my pc from real device.Can you try explain in more detail and upload a small example.
What kind of files and location in your PC?
How do you enable the local web server? wamp or laragon?I want access to localhost on my pc from real device.
How I know ip address and port to access.
php ,image
It run on emulator but I want run it on my phone
Thank you, I used it before and said it in the first post but nothingHow do you enable the local web server? wamp or laragon?
Check the port used in this app. It is usually set to 80 or 8000. If it is 80 then you can ignore the port number.
To check the local IP, use windows command prompt and type in ipconfig and check the IPv4 as in my YouTube video.
View attachment 142927 View attachment 142928
Second way:
At the time I recorded the video, there is no info for WiFi settings in Windows 11. Now I can use the WiFi settings to check my local IP.
View attachment 142925 View attachment 142926
My network from mobileMake sure you have forwarded the request to the correct local ip (192.168.50.42) for the specified port in your Router first.
Also make sure to assign always the same IP to this Computer in your router.
The same applies to Mobile Hotspot.My network from mobile
Yes , I have 2 mobilesThe same applies to Mobile Hotspot.
Edit: Do you want to access from another mobile which is not the one hosting the Hotspot? Then the mobile device also need to connect to the Hotspot similar to your PC.
http://IPv4 address my pc:8000/w2/index.php
Let say I haveYes , I have 2 mobiles
Thank's for the clarificationLet say I have
Mobile 1 (Huawei) - HotSpot (IP: 192.168.10.254)
PC1 (Lenovo) - IP: 192.168.10.12
Mobile 2 (Xiaomi) - IP: 192.168.10.6
Mobile 1 is sharing the internet data to PC1 and Mobile 2.
PC1 should be able to open the PHP web app with address http://127.0.0.1 and http://192.168.10.12
Then you can check in your Mobile 2 using a mobile web browser try to open the PHP web app with address http://192.168.10.12
If you can open, then there should be no problem using okHttpUtils2 from your B4A app in Mobile 2.
What development server you are using?Thank's for the clarification
first I test my file in browser before
http://127.0.0.1 is ok
http:// ipv4
Hmmm… can't reach this page
You mean you can't even open http://192.168.2.235 from your PC?192.168.2.235
Sorry, it's not yet clear for me.I want access to localhost on my pc from real device.
How I know ip address and port to access.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?