Integrating with other Push SDKs

If your game integrates with other SDKs which send push notifications and require custom notification handling, you will need to make some modifications to your integration to ensure that both Teak and your other SDKs function as expected.

iOS

On iOS, Teak will automatically intercept calls to any configured UNUserNotificationCenterDelegate on [UNUserNotificationCenter currentNotificationCenter]. Teak will handle the notification, if it was sent by Teak, before invoking your delegate code.

You can confirm that this is working by observing the PostLaunchSummary and confirming that the launch is attributed to a notification when launching the game by tapping on a Teak notification.

In the unlikely event that this does not automatically work, you will need to add additional code to your implementation of userNotificationCenter:didReceiveNotificationResponse:withCompletetionHandler

Add This
Class teak = NSClassFromString(@"Teak");
if([teak isTeakNotification:response.notification]) {
    [teak didReceiveNotificationResponse:response withCompletionHandler:completionHandler];
    return;
}
Add This
Class teak = NSClassFromString(@"Teak");
if([teak isTeakNotification:notification]) {
    [teak willPresentNotification:response withCompletionHandler:completionHandler];
    return;
}

Android

In your custom onMessageReceived

Add This
if (io.teak.sdk.push.FCMPushProvider.isTeakNotification(remoteMessage)) {
    io.teak.sdk.push.FCMPushProvider.onMessageReceivedExternal(remoteMessage, getApplicationContext());
    return;
}

You can confirm that this is working by verifying that notifications sent by all of your providers, including Teak, are correctly displayed on a test device.