Problems consuming WS

21 views
Skip to first unread message

rdvg...@gmail.com

unread,
Jul 20, 2021, 12:07:11 AM7/20/21
to CodenameOne Discussions
Hi,

My project is quite large and to demonstrate my problem I have created a small code.

I have a WS in PHP that I have tested with Postman working 100%. In the debugger I run my little code and as the image shows I can see the result of the query without problem.

When I put the app on the cell phone, it sent me the error message that is shown at the end of the attached image.

It is also good that they know that there is a web development that makes use of the DB (not the WS) without problem.

Could you give me any suggestions on how to solve the problem?
Greetings

error.png

Shai Almog

unread,
Jul 20, 2021, 10:01:36 PM7/20/21
to CodenameOne Discussions
Hi,
there are two possibilities:
- The URL could be unreachable from the device. It's possible that the IP address you gave isn't public
- Phones block HTTP URLs by default (there's a warning in the console if you'll look). See this answer for Android: https://stackoverflow.com/a/57130188/756809

Notice you will need to have a proper HTTPS server for production...

rdvg...@gmail.com

unread,
Jul 21, 2021, 1:43:23 AM7/21/21
to CodenameOne Discussions
Thanks for support
Reply all
Reply to author
Forward
0 new messages