phonegap navigator.notification.alert doesn't work

后端 未结 6 1047
时光说笑
时光说笑 2021-01-02 01:48

The title is self explanatory, I ca\'t figure out why tho.

sources: www/index.html:



    
        

        
6条回答
  •  清酒与你
    2021-01-02 02:41

    I built your project using Cordova CLI 3.0.9, using the command line tools and following the docs listed here (http://cordova.apache.org/docs/en/edge/cordova_notification_notification.md.html#Notification). I used your HTML and JS code and the dialog popped up just fine.

    When looking through the other files, I noticed a difference in config.xml; my config.xml looks like this:

    
    
        Hello Cordova
        
            A sample Apache Cordova application that responds to the deviceready event.
        
        
            Apache Cordova Team
        
        
        
            
        
        
            
        
        
            
        
        
        
        
        
        
    
    

    Notice that mine has org.apache.cordova.dialogs.Notification - yours is missing the dialogs namespace for some reason. Is this on purpose? If you add "dialogs" namespace, does it work? What about if you rebuild using the latest CLI version?

提交回复
热议问题