New Huawei Push Service control regulations and how to adapt

更新时间:
复制 MD 格式

Background

Starting September 15, 2023, Huawei will implement new regulations. All notifications, regardless of whether the app is online or offline, will be controlled by the Huawei phone system. This control includes limits on the number of notifications sent and how they are displayed.

Summary of the rules

Classification by delivery channel

  • Cloud notifications: Delivered through the Huawei channel. On the client, these notifications depend on the AndroidPopupActivity dialog box, and data is passed through this class.

  • Local notifications: Delivered through the Alibaba channel. On the client, these notifications can be received by MessageReceiver or IntentService, and the dialog box can be customized.

Classification by message content

  • Service and communication: No limit on the number of messages. Features such as lock screen display, ringtones, and vibration are available depending on the category.

  • Information and marketing: Standard apps are limited to 2 messages per day, and certified news agency apps are limited to 5 messages per day. These are silent notifications. Important: Local notifications delivered through the Alibaba channel also count toward this quota.

EMAS Push adaptation rules

Which channel does the client use for delivery?

Classification information not provided (AndroidMessageHuaweiCategory not set)

Classification information provided

(AndroidMessageHuaweiCategory set)

SDK < 3.8.7

Huawei channel

Huawei channel

SDK ≥ 3.8.7

Online: Alibaba channel

Offline: Huawei channel

Online and the local classification value is not "Unsupported": Alibaba channel

Online and the local classification value is "Unsupported": Huawei channel

Offline and the cloud notification classification is not "Not applicable": Huawei channel

Offline and the cloud notification classification is "Not applicable": Alibaba channel

  • Note: Upgrade the client software development kit (SDK) to version 3.8.7 as soon as possible.

Which parameter should the server send?

  • AndroidNotificationHuaweiChannel (corresponds to Huawei importance): Do not set this parameter.

  • AndroidMessageHuaweiCategory (corresponds to Huawei category)

    • If empty: Online messages use the Alibaba channel, and offline messages use the Huawei channel. The limit is 2 messages per day for standard apps and 5 messages per day for certified news agency apps.

    • If not empty: The push effect is determined by the specific value. For more information, see the Recommended values for EMAS section below.

  • Note: If the server-side already has the AndroidMessageHuaweiCategory parameter, you do not need to upgrade.

Examples of notification types

  1. Both cloud and local categories have values: Request the cloud value "IM". Push result: When the app is online, messages are delivered through the Alibaba channel. When the app is offline, messages are delivered through the Huawei channel. image.png

  2. The cloud category has a value, and the local category is "Unsupported": Request the cloud value "HEALTH". Push result: Messages are delivered only through the Huawei channel.image.png

  3. The cloud category is "Not applicable", and the local category has a value: Set the value to "CATEGORY_ALARM". Push result: Messages are delivered only through the Alibaba channel.image.png

Recommended values for AndroidMessageHuaweiCategory (ignore for marketing notifications)

If your message type is listed in the table below, request the recommended value and pass it to the AndroidMessageHuaweiCategory parameter.

This lets you send an unlimited number of pushes, but the push effect depends on the message type.

Message type

Cloud notification category value

Local notification category value

AndroidMessageHuaweiCategory value

Effect of the value

Instant chat

IM

CATEGORY_MESSAGE

IM

SDK ≥ 3.8.7: Alibaba channel (online), Huawei channel (offline). SDK < 3.8.7: Huawei channel.

Audio and video calls

VOIP

CATEGORY_CALL

VOIP

SDK ≥ 3.8.7: Alibaba channel (online), Huawei channel (offline).

SDK < 3.8.7: Huawei channel.

Subscriptions

SUBSCRIPTION

Unsupported

SUBSCRIPTION

Huawei channel

Travel

TRAVEL

CATEGORY_NAVIGATION

TRAVEL

SDK ≥ 3.8.7: Alibaba channel (online), Huawei channel (offline).

SDK < 3.8.7: Huawei channel.

Health

HEALTH

Unsupported

HEALTH

Huawei channel

Work reminders

WORK

CATEGORY_REMINDER

WORK

SDK ≥ 3.8.7: Alibaba channel (online), Huawei channel (offline).

SDK < 3.8.7: Huawei channel.

Account updates

ACCOUNT

Unsupported

ACCOUNT

Huawei channel

Orders & logistics

EXPRESS

Unsupported

EXPRESS

Huawei channel

Finance

FINANCE

CATEGORY_SERVICE

FINANCE

SDK ≥ 3.8.7: Alibaba channel (online), Huawei channel (offline).

SDK < 3.8.7: Huawei channel.

Device reminders

DEVICE_REMINDER

Unsupported

DEVICE_REMINDER

Huawei channel

Email

MAIL

CATEGORY_EMAIL

MAIL

SDK ≥ 3.8.7: Alibaba channel (online), Huawei channel (offline).

SDK < 3.8.7: Huawei channel.

Alarms/Timers

Not applicable

CATEGORY_ALARM

CATEGORY_ALARM

Alibaba channel

Stopwatch

Not applicable

CATEGORY_STOPWATCH

CATEGORY_STOPWATCH

Alibaba channel

Progress

Not applicable

CATEGORY_PROGRESS

CATEGORY_PROGRESS

Alibaba channel

Location sharing

Not applicable

CATEGORY_LOCATION_SHARING

CATEGORY_LOCATION_SHARING

Alibaba channel

Content recommendations

MARKETING

CATEGORY_RECOMMENDATION

CATEGORY_RECOMMENDATION

SDK ≥ 3.8.7: Alibaba channel (online), Huawei channel (offline).

SDK < 3.8.7: Huawei channel.

News

Financial updates

Lifestyle information

Surveys

Other

Social updates

CATEGORY_SOCIAL

CATEGORY_SOCIAL

Product promotions

CATEGORY_PROMO

CATEGORY_PROMO

Feature recommendations

Operational activities

Push effects and data retrieval

  • Delivered through the Alibaba channel

    • Data is retrieved on the client in a class that inherits from MessageReceiver.

    • The dialog box style can be customized and is displayed by MessageReceiver.

  • Delivered through the Huawei channel

    • Data is retrieved on the client in the onSysNoticeOpened method of a class that inherits from AndroidPopupActivity.

    • The dialog box style cannot be customized. It depends on the AndroidPopupActivity dialog box.