Version: 1.3
语言 : 中文
IAP Service
Ads Service

Push Service

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:

Push Service config

To integrate with Push service:

  1. Open the OpenHarmonySDKKitsSettings window.

  2. Fill in the common configuration include client_id, app_id, Bundle Name.

  3. Check the Push Kit.

  4. Click on Open Scene to open the demo scene with the interface integrated, and operate each function in the scene.

    Check the Push Kit
    Check the Push Kit

Push Service demo 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.

Push Scene
Push Scene

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.

Export and build

To run the demo on the OpenHarmony devices:

  1. Open the OpenHarmonySDKKitsSettings window.
  2. Make sure client_id, app_id and Bundle Name have been filled correctly. Make sure Push Kit have been checked.
  3. Open the Build Settings window.
  4. Switch to OpenHarmony platform and check Export Project.
  5. Export project.
  6. Open the exported project in DevEco, build and run on OpenHarmony device.
IAP Service
Ads Service