Huawei: Authorizing OneSignal
Requirements
- A Huawei Developer Account
- An Android mobile app
- App also created on Huawei's AppGallery Connect
- A OneSignal Account, if you do not already have one.
- If you have end users in China, are using Huawei's intelligent message classification, and desire more specific message classification, apply for Huawei's Self-Classification Rights using their instructions here. Use
Huawei_category
via the API to classify notifications.
Step 1: Enable PushKit
1.1 Enable Huawei PushKit on your app from Huawei's AppGallery Connect
Step 2: Getting Your Huawei PushKit Values
2.1 From Huawei's AppGallery Connect select your app from "My Apps".
2.2 Click In-App Purchases under All services > Earn.
Save the "Package name", "Client ID", and "Client secret" from this page for the next step.
Step 3: Configure Your OneSignal App's Huawei Platform Settings
3.1 In the OneSignal dashboard select your app from the All Apps page, then go to Settings. Under Native App Platforms, click Huawei Android.
3.2 Paste your "Package name", "Client ID into the APP ID field", and "Client secret into the App Secret field" and click Next.
Done! You now have the required Huawei keys entered to send push notifications from your app. 🥳
If you have not already done so, proceed to install the OneSignal SDK in your app.
Step 4: Apply for Huawei's Self-Classification Rights (Optional)
As of March 31, 2023, Huawei requires all AppGallery apps that send notifications to end-users in China to be classified. Different message categories are subject to rate limits. While they have automatic classification, self-classification enables more flexibility and accurate message categorization.
If you have end-users in China, and have used Huawei's intelligent message classification but desire more specific/accurate message classification to fit your business needs, you must apply for Huawei's Self-Classification Rights first using their instructions here.
Once you have been approved for Message Self-Classification, you can utilize OneSignal's Huawei_category
field. Default category is set to MARKETING
, which are subject to limitations of 2-5 daily sends, depending on which third-level classifications they fall in. The field options are:
IM
VOIP
SUBSCRIPTION
TRAVEL
HEALTH
WORK
ACCOUNT
EXPRESS
FINANCE
DEVICE_REMINDER
MAIL
MARKETING
Refer to this Huawei document for push notification limits for each category. Classification violations are subject to penalties enforced by Huawei.
Updated 9 months ago