The Push Service provides a message push channel from the cloud to the terminal. By integrating Push Kit, you can push messages to client applications in real time, build good user relationships, and improve user perception and activity.
For more information, you can click the following link to reach directly:
To integrate with Push service:
Open the OpenHarmonySDKKitsSettings window.
Fill in the common configuration include client_id
, app_id
, Bundle Name
.
Check the Push Kit.
Click on Open Scene
to open the demo scene with the interface integrated, and operate each function in the scene.
To open the Push Service demo scene in the Tuanjie Editor: OpenHarmonySDKKits > OpenHarmonySDKKitsSettings > Push Kit > Open Scene.
In common application push scenarios, push messages should be sent by the server and received by the application. In order to demonstrate the entire push process, we have built-in the function of sending push messages in the demo. - If you do not have a server, you can use the functions in the demo scene to experience the complete functions of sending and receiving push messages. - If you have a custom server, you can use your own server to send messages. In this case, the demo scene can also only receives messages.
The functions of Push and their calling interfaces are as follows:
Area | Description |
---|---|
Push Token | Push token could be displayed here. |
Title | If you do not have a server, you can input title of push message then click push to simulate sending a message. |
Body | If you do not have a server, you can input body of push message then click push to simulate sending a message. |
Push | Click to push a message while title and body have been filled. |
Get token | Click to get push token. |
To run the demo on the OpenHarmony devices:
client_id
, app_id
and Bundle Name
have been filled correctly. Make sure Push Kit have been checked.