Register a Client
Note: Ensure you have installed the required package to use this SDK method.
You can register a client device or browser to receive push notifications using the enableNotification() SDK method. Once the client is registered, you can define a messageHandler on the component instance to handle incoming push notification messages.
The pushNotification instance used here is the component instance.
copy
// Register the client
const response = await pushNotification.enableNotification();
// Create a handler for the message when received
pushNotification.messageHandler = (msg) => {
// Action to be performed when the message is received
};
Last Updated 2026-07-02 14:51:41 +0530 IST
Yes
No
Send your feedback to us
Skip
Submit