I commonly use OkHttpUtils2 library to call a WebService that I did on my site. Today I had a bad surprise, which seems not have an easy to find explanation.
Usually, in a BrowSer, the working call is:
In B4A, i use:
The App runs on devices with Internet SimCards, but, in Italian SimCard, I get JobTrasm.Success = true, while in Portuguese SimCard it return false. If I use the same Sim giving HotSpot to a computer, and issue the abovementioned "Http://www.mysite.it..." call, it works. The only not working case is in the B4A App and the JobTrasm error is:
java.net.UnknownServiceException: CLEARTEXT communication to www.mysite.it not permitted by network security policy
As I wrote, it seems not to be strictly related to the use of the Portuguese (only) sim card, but to the use of it with B4A, and, probably, with Vrsion 12.00. As a matter of fact I never had this problem before the last upgrade to Version 12.
Thanks in advance for any hint.
Usually, in a BrowSer, the working call is:
In B4A, i use:
B4X:
Dim Url as string : Url="http://www.mysite.it/MyWebService/MywebService.asmx"
Dim ReqString as string: ReqString="Request=..."
Dim JobTrasm as HttpJob
JobTrasm.PostString(Url,ReqString)
The App runs on devices with Internet SimCards, but, in Italian SimCard, I get JobTrasm.Success = true, while in Portuguese SimCard it return false. If I use the same Sim giving HotSpot to a computer, and issue the abovementioned "Http://www.mysite.it..." call, it works. The only not working case is in the B4A App and the JobTrasm error is:
java.net.UnknownServiceException: CLEARTEXT communication to www.mysite.it not permitted by network security policy
As I wrote, it seems not to be strictly related to the use of the Portuguese (only) sim card, but to the use of it with B4A, and, probably, with Vrsion 12.00. As a matter of fact I never had this problem before the last upgrade to Version 12.
Thanks in advance for any hint.