Last Updated on : 2023-09-15 09:11:00download
This topic describes how to configure Google Firebase Cloud Messaging (FCM) to implement push notifications in an OEM app for Android.
Go to Google Firebase and follow instructions to register an account and log in to Google Firebase.
Click App project.
Enter your project name and click Continue.
Click Not right now > Create project.
Click Continue.
On the Get started by adding Firebase to your app page, click the Android logo as denoted in the figure.
Fill in the package name of the app in the Android package name field and click Register app. The package name can be obtained from the Tuya IoT Development Platform.
The package name must be correct. Otherwise, push notifications cannot be received.
Click Next.
Click Continue to console.
In the top left corner of the console, click ⚙️ > Project settings.
Click General > google-services.json to download this file.
Go to Tuya IoT Development Platform > App > OEM App > Required Setting, select the target app, and then click the Certificate for Android tab.
Find Configure Google FCM > Upload JSON file and upload the google-services.json file downloaded in the previous step.
Perform the following steps to get the information to be entered in Sender ID and Server Key:
Return to Google Firebase, go to cloud messaging > Cloud Messaging API (legacy), and then click the kebab menu icon > Manage APIs in Google Cloud Console.
In the Google Cloud Console that appears, click Enable.
Return to Cloud Messaging API (legacy) and refresh the page to see the values of Server key and Sender ID.
The values of Server Key and Sender ID must be correctly entered. Otherwise, push notifications cannot be received.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback