Question

I have a really weird problem with inappBrowser: It will always display an error message when trying to load a web url. Here is the code:

    var twitterShareUrl =  "https://twitter.com/intent/tweet/?" +
    "text=" + encodeURIComponent("A fancy message") +
    "&url=" + encodeURIComponent("http://myurl.com");
    var browser = window.open(twitterShareUrl, '_blank', "location=no");
    browser.addEventListener('loadstart', function (e) {

        if (/\/complete/.test(e.url)) {
            browser.close();
        }
    });

Cordova is 2.4, I have to use this version because of a plugin.

Was it helpful?

Solution

Problem solved: it was because the phone did not have a SIM card (i was using just wifi for my tests). I don't really knows how the things are related but inserting a sim solved the problem (and also unlocked a series of things like email checking on gmail).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top