Run in debug mode and see what happens. Maybe the download fails.
Hello Erel, thank's for fast answer.
The code still work in NOX but not in Xiaomi MI 10.
As the code was working in the phone 3 days ago I suspect that I have done something but I don't know what.
I have tried to connect to local server but it's the same.
I have debug and get following in the log.
Logger connected to: Xiaomi Mi 10
--------- beginning of system
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
ResponseError. Reason: java.net.UnknownServiceException: CLEARTEXT communication to gatetec.se not permitted by network security policy, Response:
ResponseError. Reason: java.net.UnknownServiceException: CLEARTEXT communication to gatetec.se not permitted by network security policy, Response:
ResponseError. Reason: java.net.UnknownServiceException: CLEARTEXT communication to gatetec.se not permitted by network security policy, Response:
** Activity (main) Pause, UserClosed = false **
Copying updated assets files (1)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
ResponseError. Reason: java.net.UnknownServiceException: CLEARTEXT communication to gatetec.se not permitted by network security policy, Response:
** Activity (main) Pause, UserClosed = false **
I have following permissions:
android.permission.INTERNET