Sending Your First Notification
To make sure everything is set up properly, let’s send a test notification to your device.
A recap of what we’ve done so far is also the requirements for this section:
-
You have completed the setup steps for iOS Push Certificates or Android FCM Credentials.
-
You know where to find the Player ID for your test user.
-
The game has Teak integrated and is building on device.
-
You Allowed push notifications on your test device when the game prompted you.
-
You see your test device on the 5 Minute Active Users chart on the Teak dashboard.
Hello World (Push Notification)
Now let’s send our first notification to our test user. We’ll create a message from the Teak dashboard, select a test recipient, and see the preview notification on our device.
Create a Message to Send
In the Teak dashboard for your game, we will create your first notification.
This tutorial is written for iOS, but the steps are the same for Android, except you will need to click on the Android things instead.
-
Click on Notifications, select the iOS Push tab, and then click New Message.
-
Fill out the form in the modal. Give your message a Name, and select the platforms you want to create content for. Click Next.
If you want to test Android as well, check that box too.
-
Enter your desired message content, and click Next.
-
Review and save your message.
You’ll now see it in the messages list.
Now, we need to send our message to the device. We’ll use Preview for that.
Add a Preview Recipient
Usually in Teak, we send messages to whole audiences at once using Audiences and Schedules. But, for the purpose of testing, we can use the Preview functionality to only send to our test device.
To send a Preview, we need to tell Teak who we want to send to, and which of their devices to target.
-
You should see your message in the messages list on the Teak dashboard. Click Preview.
-
Then select Add Recipients.
-
Enter your player ID (or
userIdentifier
) in the Search by Game User ID field.You can get this from your game on the test device (if it displays the player ID) or from the console log (Teak will output it when Identify User is called if trace logging is enabled).
-
Click Search, and then click Register when your device is found.
-
Add a label so you can keep your test devices straight, and click Save.
Other team members you invite to this game will be able to see your test devices, so choose a name that is helpful for the whole team.
Your test device is now saved for this game. The next time you want to preview a message, you can just select your device from the list.
Receive the Notification
-
If everything is set up properly, the notification will show up on your device!
Congratulations, you’ve sent your first push notification using Teak!
Next Steps
Your initial Teak integration is done. Teak is setup to collect data which your CRMs will use to create and send notifications to specific audiences.
But, there’s still more to setup:
-
Ask for Push Permissions more strategically
-
Set up Rewarding
-
Set up Universal Links
-
Set up Deep Links
-
Set up Local Notifications
Proceed to Features for additional steps.