I am trying to print some value in console, just to check whether the alarm is working or not, but the alarm does not fire and it doesn't print anything in console, is there anything which is missing?, Here is background.js file
`
// Running a code after every 1 minutes starts
chrome.alarms.create('Health Api Alarm', {
periodInMinutes: 1,
});
console.log('In background.js');
chrome.alarms.getAll(function (alarms) {
console.log('All alarms', alarms);
});
chrome.alarms.onAlarm.addListener(function (alarm) {
console.log('Inside alarm function');
if (alarm.name === 'Health Api Alarm') {
let time = new Date().toLocaleTimeString();
console.log('The current time is ' + time);
}
});
// Running a code after every 1 minutes ends
`
I tried to print the current time after every one minute, but the alarm did not fired.