cordova.plugins.notification.badge.set(10);

this is not working for me , tried in differrent devices

cordova.plugins.notification.badge.hasPermission

this code returns true can anyone help me

1

There are 1 answers

1
Kirankumar Dafda On

I have made some changes in your script just try setting the same and let me know if it is working or not

<script>
    document.addEventListener("deviceready", onDeviceReady, false);

    function onDeviceReady(){
        cordova.plugins.notification.badge.hasPermission(function(granted){ 
            alert('Permission has been granted: ' + granted);
            cordova.plugins.notification.badge.set(10);
        }); 
    }
</script>