I am developing an application that uses access to my WEB server. The code I wrote always worked successfully, I copied all the relevant lines in different applications and always successfully. Now I am working on a new application, but this already tested code gives an error. The list of libraries and strings in the manifest are the same. What could be the reason?
ResponseError. Reason: java.net.UnknownServiceException: CLEARTEXT communication to gip#####.in######.### not permitted by network security policy, Response:
ResponseError. Reason: java.net.UnknownServiceException: CLEARTEXT communication to gip#####.in######.### not permitted by network security policy, Response:
Connect to WEB server:
Dim WEBserver As ServerSocket
Log(" Instal conect WEB server")
WEBserver.Initialize(0, "")
' Try
Starter.pInternet=True
If WEBserver.GetMyWifiIP="127.0.0.1" Then Starter.pInternet=False
If WEBserver.GetMyIP="127.0.0.1" Then Starter.pInternet=False 'this is the local host address
' If Not(Device.Gettate.EqualsIgnoreCase("CONNECTED")) And server.GetMyWifiIP="127.0.0.1" Then pInternet=False
Log(" Test my IP fnd access to Internet " & Starter.pInternet)
' Catch
' Log(LastException)
' Starter.pInternet=False
' End Try
If Starter.pInternet=True Then
' Try
Dim job As HttpJob
job.Initialize("internet_connection", Me)
job.Download("http://gi######.#####.###/g#####.php")
Wait For(job) JobDone(job As HttpJob)
Sleep(2000)
Log(" Result conect to WEB server" & job.Success )
If job.Success Then
Dim Res As String
Res = job.GetString
Dim parser As JSONParser
parser.Initialize(Res)
Dim data As List
data = parser.NextArray 'returns a list with map
Dim m As Map, Answer As String, Quantity As Int
m = data.Get(0)
Answer=m.Get("answer")
Quantity=m.Get("quantity")
Last edited: