After some digging, I found that the app refuses the connection to my api due to self signed certificates. I needed to add a flag to accept the connection:
public static RestClient GetMobileAPIClient()
{
HttpClientHandler handler = new HttpClientHandler();
#if DEBUG
handler.ServerCertificateCustomValidationCallback = (message, cert, chain, errors) =>
{
if (cert != null && cert.Issuer.Equals("CN=localhost"))
return true;
return errors == System.Net.Security.SslPolicyErrors.None;
};
#endif
HttpClient client = new HttpClient(handler);
client.BaseAddress = new Uri(Constants.MobileAPIURI);
return new RestClient(client);
}
As for the ping that never returned anything, I found out that a ping always times out in an Android VM, unless you call a java operation directly.