Follow the steps in the following process when you develop a web app.
Step | Description |
|---|---|
Register as a Huawei developer. Create an app and configure app information in AppGallery Connect. | |
Enable the WebPush agent in AppGallery Connect. | |
In Web push configuration, click Generate key pair. Alternatively, use the CLI to generate a key pair and import it in Web push configuration. | |
Copy the code snippets in Web push configuration to your project. | |
Use the callback function to receive a message when the browser is running in the foreground. | |
Obtain a token to access Push Kit. | |
Use the Push Kit server API to send a message to a web app. |