1

im trying to send push by http to Huawei Devices with Huawei consolé integration, but the documentation is confuse, and i'm not really sure how to build my body to send

I have this, but only works for foreground, if the app is in background or terminated, the push isn't working

This is the portar i'm following https://developer.huawei.com/consumer/es/doc/development/quickApp-Guides/quickapp-access-push-kit#dataDesc

{
    "validate_only": false,
    "message": {
        "data": "{title: Hello! 1, description: Hello, shirley!, params: { key1: test1, key2: test2}, ringtone: {vibration: true, breathLight: true}}",
        "android": {
            "title": "Hello! 1",
            "body": "Hello, shirley!",
            "params": {
                "key1": "test1",
                "key2": "test2"
            },
            "click_action": {
                "type": 3
            }
        },
        "token": [
            "IAAAAACy0irbAADqfnlY9pfEgoWWoIzgCBXQzPol8CTNzV6i3V5byP7cIhuU74vovAwysjkI_XMwowYj1sv5SrhXRi-sYXB5OrplLHEB02LO0pKHcA"
        ]
    }
}
zhangxaochen
  • 32,744
  • 15
  • 77
  • 108
Jonathan Ixcayau
  • 567
  • 3
  • 14

1 Answers1

1

The conditions received by the Push notification do not need to be run in the foreground.

According to the Docs,You can send push messages in either of the following ways:

Select target users in AppGallery Connect. In this case, messages can be pushed to both quick apps on the live network and those running on a quick app loader.

Send push messages to a large number of users in batches by invoking server APIs. In this case, messages can be pushed to both quick apps on the live network and those running on a quick app loader.

Conditions for a quick app to receive push messages are as follows.

enter image description here

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108