Start a new topic

Guidlines for HTTPS implementation with phonegap _ wikitude

Guidlines for HTTPS implementation with phonegap _ wikitude

We have implemented AR application using Phonegap + wikitude plugins. We are trying to invoke HTTPS URL using AJAX. and It is notreturning response.

Please help us with providing standards for implementation how to invoke HTTPS using Phonegap + wikitude plugins?



Hi Rakesh,

The described issue is more related to JavaScript than to our SDK.
Please ensure your server set-up is done properly and the https certificate is valid.

Please also have a look at AJAX - https posts and hints.
The WebView used in Wikitude's SDK has same ruleset and behavior than the one of your in built browser, so please test your requests upfront in the browser too.

Kind regards,

Here is code snippet what giving us problem to invoke HTTPS

serverUrl - https URL

var jqxhr = $.getJSON(serverUrl, function(data) {
            .error(function(err) {
            alert("JSON error occured! " + JSON.stringify(err));
            .complete(function() {});


throws error : HTTP 302


Hi Rakesh!

As mentioned in my previous post, this issue is not related to the Wikitude SDK as such.
I guess it has something to do with your server set-up and the way ajax works with it.

Please check out the stackoverflow posts related to your issue.

Kind regards,


Thanks for you quick reply and we move ahead with following code

            type: "GET", crossDomain: true,
            dataType: "jsonp",
            beforeSend: function (xhr) { xhr.setRequestHeader('Access-Control-Allow-Origin', '*'); },
            url: url
            //data: { lat: '53.30350', lon: '-2.235688' }
            //success: function (response) {
            //    alert("success");
            //error: function (returnval) {
            //    alert("error");
            //    console.log(returnval);
       .done(function (msg) {
       .fail(function (jqXHR, textStatus, eee) {
           alert("ErrorHOMEPAGE: Unable to fetch test Details." + JSON.stringify(jqXHR) + " || " + textStatus + "||" + eee);


we have return test application and this is working fine on Android chrome browser by prompting certificate allow/denied message. but when we put this code into the test webview applicattion doesnt invoke HTTPS request.

I guess why browser always prompting for certificate for each request on browser. In case of browser we can accept or deined and get result on browser reponse. but in case of application programmatically invoking HTTPS using AJAX on cross domain it will simply get rejected. because each request awaiting for certificate confimration.

Additional Info:

We have certificate chain of client cert(.p12) -> intermediate cert(.p12) -> root CA(.p12)

we have installed client certificate on Android this is giving me message (certificate installed successfully) and when I am installing root CA certificate I am getting message no certificate to install.

so our application using client cert to communicate with server (HTTPS) using with root server cert. ( working fine on web/mobile with chrome)

we need to know as per our analysis of this issue

we need to present a client certificate to the server - how do I configure webview to use a particular client cert




Login or Signup to post a comment