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.

  1. Click on Notifications, select the iOS Push tab, and then click New Message.

    alt_text
  2. Fill out the form in the modal. Give your message a Name, and select the platforms you want to create content for. Click Next.

    alt_text

    If you want to test Android as well, check that box too.

  3. Enter your desired message content, and click Next.

    alt_text
  4. Review and save your message.

    alt_text

    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.

  1. You should see your message in the messages list on the Teak dashboard. Click Preview.

    alt_text
  2. Then select Add Recipients.

    alt_text
  3. 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).

  4. Click Search, and then click Register when your device is found.

    alt_text
  5. 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.

    alt_text

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.

Send Preview

Almost there! Let’s send the notification to your device.

  1. First, make sure your game is not open on your device. By default, notifications don’t show up if the game is already in the foreground.

  2. Then, from the message preview in the Teak dashboard, click Send Preview.

    alt_text

Receive the Notification

  1. If everything is set up properly, the notification will show up on your device!

    alt_text

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.