Notification Service (user notification service) provides a local notification publishing channel, which can be used to push notifications generated by the application directly to users on the client.
For more information, you can click the following link to reach directly:
To integrate with Notification service:
Open the OpenHarmonySDKKitsSettings window.
Fill in the common configuration include client_id
, app_id
, Bundle Name
.
Check the Notification Kit.
Click on Open Scene
to open the demo scene with the interface integrated, and operate each function in the scene.
To open the Notification Service demo scene in the Tuanjie Editor: OpenHarmonySDKKits > OpenHarmonySDKKitsSettings > Notification Kit > Open Scene.
There are many types of Notifications. This kit only implements the posting and canceling of text notifications.
The functions of buttons and their calling interfaces are as follows:
Area | Description |
---|---|
Publish Noti | Click to pop up a pop-up window where you can enter the field for posting normal text notifications. |
Cancel Noti | Click to pop up a pop-up window, and the drop-down list will show the current notifications. Select the corresponding notification to delete. |
Output Log | The relevant log will be displayed here. |
To run the demo on the OpenHarmony devices:
client_id
, app_id
and Bundle Name
have been filled correctly. Make sure Notification Kit have been checked.