Debugging
Handling errors, enabling logging and viewing logs.
Error Handling
It's recommended that you wrap displayNotification
and createTriggerNotification
in a try/catch to catch any validation errors that may be thrown:
try {
await notifee.displayNotification({
title: 'Chat with Joe Bloggs',
body: 'A new message has been received from a user.',
...
});
} catch (e) {
console.log(e);
}
Native Logs
Android
- Enable native logs in release mode by running:
adb shell setprop log.tag.NOTIFEE DEBUG
- To quickly view Android logs in the terminal:
adb logcat '*:S' NOTIFEE:D
Copyright 2020 - 2021 © Invertase Limited
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License and code samples are licensed under the Apache 2.0 License.
All product names, logos, and brands are property of their respective owners. All company, product and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement.