Huawei

It is possible to connect with Push.Delivery to the Huawei Mobile Services (HMS) and send push notifications to Huawei devices which do not have access to Google Play Store.

Setup in Huawei AppGallery Connect

  1. Setup a developer account within Huawei AppGallery Connect and create an app. Follow the official Huawei documentation on this.

  2. Login to Huawei AppGallery Connect and enable the Push Kit inside the created project by following the Huawei documentation.

  3. After creating the app inside the project go to "Project settings" and find "App information". For the connection with Push.Delivery you need:

1 App ID
2 App secret
huawei app infos

Setup Huawei in Push console

  1. Go into the "Apps" tab and create a new App for "Huawei".

  2. Configure the push template in payload tab.

  3. Within the tab for "Huawei Settings" please insert your App ID and App secret from the Huawei AppGallery Connect.

  4. "Save" and Push.Delivery is now connected to your App inside the AppGallery Connect.

huawei settings

After setting up the App, it is time to create Tags if not done yet that users can register for.

Customize Payload

You can use this default template and modify it to your individual needs.

Default template:

[
  {
    "operation": "shift",
    "spec": {
      "priority" : "priority",
      "ttl": "ttl",
      "message": "customFields.message",
      "title": "customFields.title",
      "url": "customFields.url"
    }
  },
  {
    "operation": "default",
    "spec": {
      "pushScope": "token",
      "messageType": "data"
    }
  }
]

Default payload before transformation:

{
   "title":"Default Title",
   "message":"This is the default message"
}

Default payload after transformation:

{
  "customFields" : {
    "message" : "This is the default message",
    "title" : "Default Title"
  },
  "messageType" : "data",
  "pushScope" : "token"
}

Message Object:

Parameter

Type

Description

Default

Required

Comments

pushScope

String

'token' or 'topic'

token

No

Huawei topic or push directly to registered tokens

messageType

String

'data' or 'notification'

data

No

Huawei messageType

ttl

Integer

time to live (in seconds)

3600

No

Huawei message lifespan

priority

String

high or normal

normal

No

Huawei message priority

title

String

title

-

Yes

only for messageType notification

body

String

body

-

Yes

only for messageType notification

url

String

URL to be opened on click

-

Yes

only for messageType notification

customFields

Object

Specify custom payload values outside the Huawei reserve namespace.

Optional

-

Custom values

To learn more about how to create and modify JOLT templates please follow up in our developer documentation: push-templates