views:

149

answers:

0

Any call to a PhoneGap navigator.notification method is failing with the message "Result of expression navigator.notification [undefined] is not an object"

I've gone through the full installation and project generation process outlined here: http://phonegap.pbworks.com/Getting-started-with-Android-PhoneGap-in-Eclipse

...and the application works fine when run from Eclipse, except until trying to access the navigator object. Here is the JavaScript code that is throwing the error:

var beep = function(){
   try{
       if(navigator != null){
           navigator.notification.beep(2);
       }
   }catch(e){
       alert("Beep failed: " + e.message);
   }
}