Fotios Kotsiopoulos
Posts: 0
Joined: Mon Dec 08, 2014 9:32 am

Proxy required for Android binary or local service?

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Proxy required for Android binary or local service?

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?

Fotios Kotsiopoulos
Posts: 0
Joined: Mon Dec 08, 2014 9:32 am

Proxy required for Android binary or local service?

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Proxy required for Android binary or local service?

[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.

Fotios Kotsiopoulos
Posts: 0
Joined: Mon Dec 08, 2014 9:32 am

Proxy required for Android binary or local service?

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

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Proxy required for Android binary or local service?

Hi Fotios -

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

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Proxy required for Android binary or local service?

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.

Fotios Kotsiopoulos
Posts: 0
Joined: Mon Dec 08, 2014 9:32 am

Proxy required for Android binary or local service?

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Proxy required for Android binary or local service?

Hello!

Please take a look at the screenshot

Image

Fotios Kotsiopoulos
Posts: 0
Joined: Mon Dec 08, 2014 9:32 am

Proxy required for Android binary or local service?

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!

Return to “Issues”