Update for cordova use.