Page 1 of 1

Proxy required for Android binary or local service?

Posted: Fri Feb 13, 2015 5:34 am
by Fotios Kotsiopoulos

Hi guys,

I have a local service running in a test lab with IP address 192.168.1.144
This service is also available on the cloud with a public IP address.

My mobile application works fine in the appery.io builder when proxy is enabled using the public IP address.
It also works fine on a mobile phone (published Android binary) when using the appery.io proxy and public IP address.

I want to be able to use the mobile app on the local private network without the appery.io proxy. However, I can not get this to work without the proxy.

I assume my service doesn't support cross domain service calls which is why the appery.io proxy is required. However, if my mobile device and service are on the same network, do I still require the appery.io proxy?

If I export the application as HTML and launch a browser off a PC on the same network and the service, authentication also fails. Is this expected behaviour?

Thanks in advance,
Fotios


Proxy required for Android binary or local service?

Posted: Fri Feb 13, 2015 8:35 am
by Maryna Brodina

Hello!

I am sorry, just to clarify - are you saying service doesn't work in app installed on Android device when Appery.io proxy is disabled?


Proxy required for Android binary or local service?

Posted: Fri Feb 13, 2015 9:04 am
by Fotios Kotsiopoulos

Hello Maryna,

Yes, that is correct. The app installed on Android device does not work when Appery.io proxy is disabled.

Service is installed on server with both local private IP 192.168.1.144 and public IP address.

App on Android device works when Appery.io proxy is enabled and accessing the public IP address.
App on Android device does not work when Appery.io proxy is disabled and accessing either the private or public IP address for service.
Android device is on the same private network (IP subnet) as the server hosting the service.

Regards,
Fotios


Proxy required for Android binary or local service?

Posted: Fri Feb 13, 2015 1:33 pm
by Maryna Brodina

[quote:]I assume my service doesn't support cross domain service calls[/quote] this might be the issue, you would have to do some changes in code on the server side.


Proxy required for Android binary or local service?

Posted: Sat Feb 14, 2015 1:42 am
by Fotios Kotsiopoulos

Thanks, I'll check the server side for CORS support.

However, after some more troubleshooting, I think the problem is related to the fact that the server side service is using a self signed certificate for HTTPS.

I assume the appery.io proxy is able to support services with self signed certificates when performing HTTPS JSON POST.

When my mobile app is running on the android device (without appery proxy), does it support services via HTTPS (JSON POST/GET) to a server with self signed certificate?

Regards,
Fotios


Proxy required for Android binary or local service?

Posted: Sat Feb 14, 2015 2:08 am
by Illya Stepanov

Hi Fotios -

We will need to check this with our development team, and we'll update this topic.


Proxy required for Android binary or local service?

Posted: Mon Feb 16, 2015 2:05 pm
by Evgene Karachevtsev

Hello Fotios,

Unfortunately it won't work with a self-signed certificate, for tests you can get it working either via http (you'll have to make changes in the application), or to deploy a test service so that the certificate become normal.


Proxy required for Android binary or local service?

Posted: Tue Feb 17, 2015 5:43 am
by Fotios Kotsiopoulos

Hello Evgene,

I've read that if I set the debuggable flag to true in the androidmanifest.xml file, I can test with self signed certificate. How do I set this flag prior to exporting the binary from Appery builder?

Thanks,
Fotios


Proxy required for Android binary or local service?

Posted: Tue Feb 17, 2015 9:40 am
by Maryna Brodina

Hello!

Please take a look at the screenshot

Image


Proxy required for Android binary or local service?

Posted: Wed Feb 18, 2015 4:39 am
by Fotios Kotsiopoulos

Hi,

Setting android:debuggable to true allowed me to successfully test my HTTPS service with a self signed certificate.

However, I was not able to publish with debuggable=true on Google play (alpha or beta). I had to manually copy and install the apk via USB to the device.

All is good.

Thanks!