Link Button Email and Text in phonegap

0
We created a mobile app with three link buttons configured for Email, Text messages and Phone calls. When you click on them the related Email, Text or Call app on your mobile device appears as expected. When you go back to the Mendix app it's showing an error saying: Web page not available. The web page at sms:1-408-666-7447 could not be loaded as: net::ERR_UNKNOWN_URL_SCHEME This only error only appears on Android, and this issue only appears when you click the Email or Text link button. The Phone call link button is handled properly without errors. Then created a different test scenario, and added the Format-string widget with the html5 link to create the text message like: <a href="sms:1-408-666-7447">New SMS Message</a> This works fine, without the error. Is this a Mendix bug or did I miss something?
asked
1 answers
0

In the latest release of the phonegap package which the platform generates it has some changes here:

// The client calls mail, call en text links with the window name set
        // to `_self`. This causes a new browser to be opened with the error
        // `UNSUPPORTED_URL_SCHEME`. To circumvent this we are overriding the window.open
        // so the window is set to `_system` which properly handles these schemes.
        window.open = function(strUrl, strWindowName, strWindowFeatures, callbacks) {
            if (/^(mailto:|sms:|tel:)/.test(strUrl)) {
                cordova.InAppBrowser.open(strUrl, "_system", strWindowFeatures, callbacks)
            } else {
                cordova.InAppBrowser.open(strUrl, strWindowName, strWindowFeatures, callbacks);
            }
        };

so generate a new phonegap zip, build and try again

answered