import notifee, { Importance } from "@notifee/react-native";
export const configureNotificationChannel = async () => {
return await notifee.createChannel({
id: "default",
name: "Default Notifications",
vibration: true,
importance: Importance.DEFAULT,
});
};
This is no longer working because it appears Importance is not longer exported. What is the correct variable to use to set a default channel importance?
The documentation needs to be updated I think.
await notifee.createChannel({
id: 'alarm',
name: 'Firing alarms & timers',
lights: false,
vibration: true,
importance: notifee.Importance.DEFAULT,
});
Notes: using @notifee/react-native: ^0.7.1
Sorry it's now AndroidImportance, docs will be updated this week
Great thks, just want to add that if I do notifee. AndroidImportance.DEFAULT <-- this is not working
if have to import it like that import notifee, { AndroidImportance } from '@notifee/react-native';
Docs have now been updated, and this is also covered in the release notes: https://notifee.app/react-native/docs/release-notes#060
Thank you for reporting the issue
Most helpful comment
Sorry it's now
AndroidImportance, docs will be updated this week