Last Updated on : 2024-06-24 04:18:58download
This topic describes how to request the App ID and configure the Mi Push service on the Mi Dev Platform to implement Xiaomi push notifications for your Tuya-enabled OEM app.
A Xiaomi developer account is registered on the Mi Dev Platform.
Log in to the Mi Dev Console and choose Distribute.
To proceed with this step, identity verification is required. We recommend that you register the developer account as an organization that is used to apply for software copyright.
Click Create Application to create an app.
Enter the following basic information:
Default language: Select English.
App Name: Enter an app name.
Package name: Enter a package name.
The app name and package name must be the same as those configured for your OEM app on the Tuya Developer Platform.
Confirm the settings and click Create.
After the app is created, you can get and save the following information about the app:
App ID
App Key
App Secret
Return to the Tuya Developer Platform, go to App > Required Setting > Certificate for Android, and then enter the values of App ID, App Key, and App Secret that you have obtained in the previous step.
Launch your OEM app on Xiaomi GetApps. This is required before Mi Push can be enabled for your app.
Log in to the Mi Dev Console > All apps.
Find the newly-created app, and click Enable push in the Operation column.
Configure app information
Choose Mi Dev Console >App info > Channel and click Create.
For example, if the Android package name of your app is com.example.app
, enter the following content:
In the following table, the content of the message scenario and message example are provided for your reference only. Replace them with your own content.
Notification type | Description | Message category | Custom ringtone | Message scenario | Message example |
---|---|---|---|---|---|
Doorbell call notification | Notifications from devices like doorbells | Device information | android.resource://com.example.app/raw/doorbell | Doorbell call notification | []Device notification You have a notification from the device. Device status: {your device status}. |
Alert notification | Notifications of device alerts and alarms | Device information | android.resource://com.tuya.smartiot/raw/thing_warnbell | Notification of device fault | []Device fault A fault has occurred on your device XXX. |
Notification by short ringtone | Notification of changes in device information like device status | Device information | android.resource://com.example.app/raw/shortbell | Notification of changes in device information like device status | []Device notification You have a notification from the device. Device status: {your device status}. |
Notification by long ringtone | Notification of changes in device information like device status | Device information | android.resource://com.example.app/raw/longbell | Notification of changes in device information like device status | []Device notification You have a notification from the device. Device status: {your device status}. |
Generic notification | Notification of changes in account and home information | Account information | android.resource://com.example.app/raw/shortbell | Changes in account and home information | []Home notification You have joined the XX home. |
After the channel is created, wait for Xiaomi’s review. After your app passes the review, a notification category ID is generated.
Send your app name, Android package name, notification category IDs, and notification names to Tuya’s email push@tuya.com. Then, Tuya will configure Xiaomi push notifications for your app within one to two working days.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback