Tip: Whitelist external URLs in recent Cordova versions

Hi All,

I upgraded to Cordova 3.7 and some functionality in my app stopped working: If you launch external windows (e.g. using the “geo” tag on Android then you know need to Whitelist extensions as per : https://cordova.apache.org/docs/en/4.0.0/guide_appdev_whitelist_index.md.html

For example, this code stopped working until I had updated my config.xml:

$scope.gameLocationClicked = function() {
            //pass control to mobile nav system
            AnalyticsTracker.event('gameDetail.gameLocationClicked');
                
            //default - works on android - http://habaneroconsulting.com/insights/opening-native-map-apps-from-the-mobile-browser#.VDEf6PmSx8E 
            //https://cordova.apache.org/docs/en/4.0.0/guide_appdev_whitelist_index.md.html
            var geoUrl = "geo: " + $scope.gameAd.Latitude + ", " + $scope.gameAd.Longitude;
            if (ionic.Platform.isIOS()) {
                //https://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/MapLinks/MapLinks.html
                geoUrl = 'maps:ll=' + $scope.gameAd.Latitude + ", " + $scope.gameAd.Longitude;
            }                    
            window.location = geoUrl;   
        }

You can check my youtube channel to fix your problem: