modified scanMedia to call cordova directly