0

I have an android project which uses cordova. I am firing some http requests. It works fine. But when I generated signed apk, the firing is done as https requests. Android studio does not support this type of requests. How can I find an alternate solution for this? I tried Phonegap Android app ajax requests to HTTPS fail with status 0 but this answer is outdated as Cordova 4.0.0 does not have this method .Please help me out.

Community
  • 1
  • 1
Nevin Raj Victor
  • 2,924
  • 3
  • 23
  • 37

1 Answers1

0

@Nevin, an alternative in HTML5 is to leave out the http (or https).

Instead of this:

https://domain.com/request/

Write:

//domain.com/request/

This is support by many browsers. It is a way to fix a common problem, where the javascript is on a secure connection, but the webpage is not.