Monaca Onsen UI Discord Chat Github Repo

Adding `cordova.plugins.notification.local`



  • I am working on adding this plugin cordova-plugin-local-notification from https://github.com/katzer/cordova-plugin-local-notifications, I’ve even created a fresh simple project, but it’s impossible to use it.

    The given project seems to have all the right and compatible structure with other cordova plugins, and it exports itself as the following:

    <js-module src="www/local-notification.js" name="LocalNotification">
            <clobbers target="cordova.plugins.notification.local" />
        </js-module>
    

    Yet cordova.plugins.notification.local - after deviceready is undefined in runtime (iOS).


  • Monaca

    @j4hangir How did you test the project? If you are using Monaca Debugger, please make sure to use custom built Monaca debugger (build from IDE). The store-version Monaca Debugger (from AppStore/Google Play) doesn’t contain any 3rd party Cordova plugins besides core Cordova plugin.



  • Thank you, the problem was due to not compiling a Monaca Debugger.



  • @j4hangir hey, i know this is an old thread but I was wondering if the icon in the plugin is working ?!
    I’ve searched but I can’t seem to know the correct path to set for the icon !
    Appreciate the help !

    cordova.plugins.notification.local.schedule({
    		title: "Test",
    		text: "This is a test",
    		every: { every: 'hour', count: 4 },     //every 4 hours
    		vibrate: true,     //not vibrating
    		icon: "res://mdpi",     //not showing
    		smallIcon: "/res/android/icon/mdpi.png",     //not showing
    		foreground: true
    	});
    


  • @gnazi Sorry long time ago :)