Cannot connect in Application store mode [on hold]

  

I developed a Multi-Device application for Android and IOS, but I have a problem when I compile my application in the Application Store mode to distribute on google play.

Some features that work perfectly in the debugger crash when compiling my application using the mode “Application Store” .

Example of some functions that no longer work:

My function CheckInternet, as well as my DataSnap server, my mobile application (Android) cannot connect to the server returning the following message:

socket access denied.

Example of crashing function:

function CheckInternet : boolean;
begin
result:=false;
try
dm.IdTCPClient1.ReadTimeout := 2000;
dm.IdTCPClient1.ConnectTimeout := 2000;
dm.IdTCPClient1.Port := 80;
dm.IdTCPClient1.Host := ‘google.com’;
dm.IdTCPClient1.Connect;
dm.IdTCPClient1.Disconnect;
result:=true;
except
result:=false;
end;
end;

Does the problem occur because I’m installing an APK on my phone or would the correct way be to submit the APK to Google Play and then downloaded it ?

How do I fix this?

Comments are closed.