I am creating an app which plays audio using a JS audio player. The idea is to use Phonegap and deploy it on multiple platforms. It’s working fine on iOS, Firefox (when .ogg is used) and Chrome. When I try to run it using the Android emulator it doesn’t run. It does when I use a website URL and not a locally saved ogg file. Therefore I think it is something simple, a little over my head though!
Here <http://jsfiddle.net/barney278/DVqj4/> is the index file and JS script. Not sure how to load files on the site, but I’m sure you can get the idea. The ogg file is located in the assets folder of the Android project on my computer. Here is the log from eclipse: 10-09 12:38:26.140: E/MediaPlayer(876): Error (-38,0) 10-09 12:38:26.370: D/CordovaLog(876): Uncaught TypeError: Cannot call method 'confirm' of undefined 10-09 12:38:26.370: D/CordovaLog(876): file:///android_asset/www/scripts/html5audio.js: Line 75 : Uncaught TypeError: Cannot call method 'confirm' of undefined 10-09 12:38:26.370: E/Web Console(876): Uncaught TypeError: Cannot call method 'confirm' of undefined at file:///android_asset/www/scripts/html5audio.js:75 10-09 12:38:26.440: E/MediaPlayer(876): error (1, -2147483648) 10-09 12:38:26.500: E/MediaPlayer(876): Error (1,-2147483648) And here is the bit of JS which seems to be causing the problem, line 75 is highlighted: // navigator.notification.alert('Streaming failed. Possibly due to a network error.', null, 'Stream error', 'OK'); ***LINE 75***navigator.notification.confirm( 'Streaming failed. Possibly due to a network error.', // message onConfirmRetry, // callback to invoke with index of button pressed 'Stream error', // title 'Retry,OK' // buttonLabels -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

