multi-platform cordova handling.