You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -36,32 +28,22 @@ If you want to configure the notifications for Android - please refer [here](/sd
36
28
</Admonition>
37
29
38
30
<Admonitiontype="info"title="Note">
39
-
We have changed the notification flow starting from SDK version 10.3.0. Please review the
31
+
We have changed the notification flow starting from SDK version 10.5.0. Please review the
40
32
updated documentation below for details on the new notification process.
41
33
</Admonition>
42
34
43
-
## Configure push notifications via Helpshift {#push-via-helpshift}
35
+
Notifications can be sent to your users when:
44
36
45
-
Notifications can be sent to your users when you reply to an issue submitted by them. In addition to the expected Push Notification behavior on iOS, you can customize your notifications to display a numbered badge on your App icon or play a sound alert when a notification is received.
37
+
- You reply to an issue submitted by them.
38
+
- You send a [Proactive Engagement](/sdkx-unreal/proactive-engagement) notification targeting the user
46
39
47
-
If your app does not already use push, you will need to enable push for your app. To enable push notification in your application you need to add APNS registration code on app launch.
40
+
Setting push notifications involves configuring both the Helpshift admin dashboard as well as the client app.
## Configure push notifications in the Helpshift admin dashboard {#configure-helpshift-push-admin}
61
43
62
44
<ConfigurePushNotificationsiOS />
63
45
64
-
###Configure the Helpshift Unreal SDK to handle notifications {#configure-helpshift-unreal-sdk}
46
+
## Configure the Helpshift Unreal SDK to handle notifications {#configure-helpshift-unreal-sdk}
65
47
66
48
After you have configured the push notifications in the Helpshift console, you will need to add additional setup in the project, too. First of all, you should enable the Use Push Notifications toggle in the Project Settings:
67
49
@@ -74,95 +56,124 @@ After you have configured the push notifications in the Helpshift console, you w
74
56
<Admonitiontype="info"title="Note">
75
57
76
58
When push is not configured, Helpshift SDK shows out-of-the-box "in-app notifications" for every message sent by Agents/Bots.
77
-
You should call `registerDeviceToken` API only after you have [configured the Helpshift dashboard](#configure-helpshift-push-admin) for push notifications. Calling the `registerDeviceToken` API without configuring the Helpshift dashboard will stop showing out-of-the-box "in-app notifications" for the end users.
59
+
You should call `registerDeviceToken` API only after you have [configured the Helpshift dashboard](#configure-helpshift-push-admin) for push notifications. Calling the `RegisterPushTokenIos()` API without configuring the Helpshift dashboard will stop showing out-of-the-box "in-app notifications" for the end users.
78
60
79
61
</Admonition>
80
62
63
+
### Request notification permission and register your app for push {#push-permission}
64
+
81
65
For Helpshift SDK to work with the Helpshift push notification service
82
-
you will need to invoke the `registerDeviceToken:` api call inside the application delegate method
you will need to invoke the `FIOSPlatformMisc::RegisterForRemoteNotifications()` Unreal method. This method handles requesting the user's permission to receive push notifications and registers the app for remote notifications. You should call this method at an appropriate point in your app's lifecycle, such as your GameInstance's `OnStart()` method.
For Helpshift SDK to work with the Helpshift push notification service, you will need to invoke the `RegisterPushTokenIos()` API call inside `FCoreDelegates::ApplicationRegisteredForRemoteNotificationsDelegate` Unreal delegate.
To respond to the delivery of notifications, you must implement a delegate for the shared UNUserNotificationCenter object. Your delegate object must conform to the UNUserNotificationCenterDelegate protocol, which the notification center uses to deliver notification information to your app:
- If a notification arrives while your app is in the foreground, UNUserNotificationCenterDelegate's `userNotificationCenter:willPresentNotification:withCompletionHandler:` is called.
108
+
- If a notification arrives while your app is in background or terminated, the system **does not** call the `userNotificationCenter:willPresentNotification:withCompletionHandler:` method. Instead, the system alerts the user according to the information in the notification itself.
109
+
- When the user selects an action from the notification interface, the system notifies your app of the user's choice. To receive responses, your delegate object must implement the `userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:` method.
119
110
111
+
In both cases, you should check the "origin" field of the notification dictionary and call the corresponding SDK APIs (mentioned below) if the origin is "helpshift". The Helpshift SDK will handle the notification transparently depending on it's payload:
For the `userNotificationCenter:willPresentNotification:withCompletionHandler:` delegate, invoke the `handleForegroundNotification:withCompletionHandler:` SDK API -
For the `userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler` delegate, invoke the `handleBackgroundNotificationClick:withCompletionHandler:` SDK API -
140
139
141
-
if(!Settings->UsePushNotifications){
142
-
UE_LOG(LogTemp, Error, TEXT("Use Push Notifications is not enabled in the Project Settings. Will not register the token."));
Your app only needs to configure the NotificationService extension if you are using Proactive Engagement feature. For support notifications, you can skip this configuration.
If you are using Helpshift's [Proactive Engagement](/sdkx-unreal/proactive-engagement) feature, you will need to add a NotificationService extension to your app. This extension lets the app intercept the notification and modify it's payload before iOS system posts the notification in system tray. For more details on what this service extension does and how to configure it in your app, you can refer the [Apple documentation](https://developer.apple.com/documentation/usernotifications/modifying-content-in-newly-delivered-notifications).
Helpshift uses this extension to download images to display in the push notification. If your app already has a NotificationService extension, you can re-use it for handling Helpshift notifications. In the `didReceiveNotificationRequest:withContentHandler:` method of your notification service, call the corresponding Helpshift API -
@@ -171,16 +182,12 @@ In-app notifications, unlike push notifications, appear within your app when it
171
182
172
183
These notifications are sent when an agent replies to a customer's issue. Your customers can click on these banners to go straight into the conversation screen.
0 commit comments