From ce1ec7a63e55fbc0b41876071f5af06181e476bb Mon Sep 17 00:00:00 2001 From: Unity Technologies <@unity> Date: Thu, 26 Aug 2021 00:00:00 +0000 Subject: [PATCH] com.unity.services.push-notifications@1.0.0-pre.4 ## [1.0.0-pre.4] - 2021-08-26 ### Fixed * notificationOpened analytics events will work correctly on Android * The host Android app will not forceably reboot if opened from background from a notification * Updated analytics integration so that the userCountry is correctly reported for push events * Documentation improvements --- CHANGELOG.md | 9 +++ Documentation~/index.md | 67 +++++++++--------- .../PushNotificationsAndroidLib-release.aar | Bin 32951 -> 32788 bytes Runtime/Analytics/EventsWrapper.cs | 2 + .../Analytics/PushNotificationAnalytics.cs | 8 +-- ...shNotificationsAnalyticsPlatformWrapper.cs | 10 ++- Tests/Runtime/MockPlatformWrapper.cs | 6 -- .../Runtime/PushNotificationAnalyticsTest.cs | 6 -- package.json | 8 +-- 9 files changed, 57 insertions(+), 59 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d9b6b8..fc8054c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.0.0-pre.4] - 2021-08-26 + +### Fixed + +* notificationOpened analytics events will work correctly on Android +* The host Android app will not forceably reboot if opened from background from a notification +* Updated analytics integration so that the userCountry is correctly reported for push events +* Documentation improvements + ## [1.0.0-pre.3] - 2021-08-19 ### Fixed diff --git a/Documentation~/index.md b/Documentation~/index.md index f831bd3..a93fcc1 100644 --- a/Documentation~/index.md +++ b/Documentation~/index.md @@ -1,50 +1,48 @@ # Push Notifications SDK Documentation -The Push Notifications SDK allows you to send rich push notifications to mobile devices. +The Push Notifications SDK allows you to send push notification campaigns, including rich push notifications with images, to your users. ## Platform Support -This SDK supports both iOS and Android. iOS 10+ and Android SDK > 26 (Oreo) are supported. +This SDK supports both iOS and Android. iOS 10+ and Android SDK >= 26 (Oreo) are supported. ## Quick Start -The SDK comes with a sample script that will register for push notifications. Simply add this to your project to get going. +The SDK comes with a sample script that will register for push notifications. Simply add this to your project, and replace the relevant settings, to get going. ## Registering for Push Notifications To register for push notifications, two steps are required. Firstly, you need to initialise Unity Services, so that the required analytics events can be sent to Unity Analytics 2.0. -Once that is complete, you can then register for notifications. To ensure no notifications are missed, this should be done in the startup code for your game. Note that on first registration on iOS, a user will be shown a permission request, so ensure this call is made at a convenient place in your game. The SDK will handle the showing of notification content, including images, titles and message body. +Once that is complete, you can then register for notifications. Ideally, to ensure no notifications are missed, this should be done in the startup code for your game. However, note that on first registration on iOS, a user will be shown a permission request, so also ensure this call is made at a convenient place in your game. The SDK will handle the showing of notification content, including images, titles and message body. A full code sample is shown below. ```cs -// In a monobehaviour in a convenient place in your game. -async void Start() +await UnityServices.InitializeAsync(); + +// Replace the below values with the relevant settings for your project, as discussed in the documentation below. +PushNotificationSettings settings = new PushNotificationSettings() { - await UnityServices.InitializeAsync(); - PushNotificationSettings settings = new PushNotificationSettings() - { - AndroidApiKey = "API_KEY", - AndroidSenderId = "SENDER_ID", - AndroidApplicationId = "APPLICATION_ID", - AndroidProjectId = "PROJECT_ID" - }; + AndroidApiKey = "API_KEY", + AndroidSenderId = "SENDER_ID", + AndroidApplicationId = "APPLICATION_ID", + AndroidProjectId = "PROJECT_ID" +}; - try - { +try +{ - string pushToken = await PushNotifications.RegisterForPushNotificationsAsync(settings); - - PushNotifications.OnNotificationReceived += notificationData => - { - Debug.Log("Received a notification!"); - }; - } - catch (Exception e) + string pushToken = await PushNotifications.RegisterForPushNotificationsAsync(settings); + + PushNotifications.OnNotificationReceived += notificationData => { - Debug.Log("Failed to retrieve a push notification token."); - } + Debug.Log("Received a notification!"); + }; +} +catch (Exception e) +{ + Debug.Log("Failed to retrieve a push notification token."); } ``` @@ -61,18 +59,23 @@ The SDK requires a number of settings in order to function correctly. Some setti * AndroidApplicationId: The application ID for a Firebase application to be used for Android's Firebase Cloud Messaging API. This can be found in your Firebase dashboard. * AndroidProjectId: The project ID for a Firebase project to be used for Android's Firebase Cloud Messaging API. This can be found in your Firebase dashboard. +It is safe to have one settings object for all platforms, as only the settings relevant to the current platform will be used by the SDK. + ### Analytics The SDK will records two analytics events: -* `notificationServices`: This event is recorded whenever a new token is registered on the client. It contains the push token and is used to register this token with the backend service. +* `notificationServices`: This event is recorded whenever a new token is registered on the client. It contains the push token and is used to register this token with the backend service. This allows you to send notifications from the Unity Dashboard, and is required for proper functionality of this product. * `notificationOpened`: This event is recorded whenever a notification is opened by a user. It contains data regarding which campaign and cohort the user was in, and whether the app was launched from the notification. -## Analytics Only Mode +#### Analytics Only Mode + +*WARNING: This section is only applicable if you are trying to use the Unity Dashboard Push Notification service alongside a separate Push Notification implementation. For most users this section is not required or recommended as it will lead to reduced functionality of the product* + +It is possible to integrate the SDK with an existing push notification service if required. To do so, do not call the registration methods as indicated above, and instead use the two methods in the `PushNotifications.Analytics` class alongside your existing implementation. -> **Note:** This section is only required if you have an existing push notification solution you wish to use alongside the Unity Push Notifications package. -> This will result in reduced functionality of this package - e.g. images in notifications will not be displayed. +`RecordPushTokenUpdated` should be called when you receive a new push token for a device. Note that the OS may create a new token at multiple points in the app's lifecycle, so be sure to call this whenever the token changes, and not just at startup. -It is possible to integrate the SDK with an existing push notification service if required. To do so, use the two methods in the `PushNotifications.Analytics` class. +`RecordNotificationOpened` should be called when a notification is opened. It takes a dictionary that is the data the notification payload contained, and a boolean flag to indicate whether the app was launched from the notification or not. -`RecordPushTokenUpdated` should be called when you receive \ No newline at end of file +Note that this should allow you to send and schedule notifications from the Unity Dashboard. However, it greatly depends on the other push notification implementation you have implemented, and may lead to missing images or other content in notifications, so it is strongly recommended to use the standard set up, with this SDK being the only Push Notification solution integrated, if possible. diff --git a/Plugins/Android/PushNotificationsAndroidLib-release.aar b/Plugins/Android/PushNotificationsAndroidLib-release.aar index 9b620cff6c002d00a728d8358c25e4ac44f13571..ee87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qJQ0aW$er0@>$fdp1*T5HpFH(l4K!&V9g11 zrVz^-NR)Ag`(lg5H}@bed1^JI2Hr4(`CU>oq7QU`j(q3PmC~F82W~VUTna7~U6MDo zUBo=}^a|M(>!;ff5F@RH2b8V{V!&S@e{YDNy!}O9cC(E{!BlUHHMK(lk-f&^3{-t?oq9G&+{U@xd5s() z29M_inV)lYPHb6J+EkiXTAXttzdm}sSynrVMM~1b$-{l}PWR30BNATD$80$Be*ibu z>f|*!Rz8+_1Vsejh4X3#iH2%P{oK>v^r~S7$gt|4Nc)cq{&8h#Epb+P6&ZH5KLz5y zRDt6Es1KFwEll04LDuH()@+W>9w2+LsgtvnC&=2;%*@Q@k0V>?Fi!SbPnMgrF z`nyK?Ppogq|9!>s@92MTPX38*LiAs1RsMo}jqpDw`9Ce1@;^y=HAR${6Muc><)5SU z4^13Ye?|WbP)h>@lbwGWvqOF>0ST1^GE}r5008QfcYjI($bOSSemj%?e-H*!e*gdg E04k0<{Qv*} diff --git a/Runtime/Analytics/EventsWrapper.cs b/Runtime/Analytics/EventsWrapper.cs index 9ae47ec..3ebbb38 100644 --- a/Runtime/Analytics/EventsWrapper.cs +++ b/Runtime/Analytics/EventsWrapper.cs @@ -19,6 +19,8 @@ public void RecordCustomEvent(string eventName, Dictionary param { evt.Parameters.Set(parameter.Key, parameter.Value); } + + evt.Parameters.AddUserCountry(); Events.Buffer.PushEvent(evt); } diff --git a/Runtime/Analytics/PushNotificationAnalytics.cs b/Runtime/Analytics/PushNotificationAnalytics.cs index 5201faf..f6392bb 100644 --- a/Runtime/Analytics/PushNotificationAnalytics.cs +++ b/Runtime/Analytics/PushNotificationAnalytics.cs @@ -7,7 +7,7 @@ namespace Unity.Services.PushNotifications static class SdkVersion { // This value should always match what is in the package.json for this package - public static readonly string SDK_VERSION = "1.0.0-pre.2"; + public static readonly string SDK_VERSION = "1.0.0-pre.4"; } interface IPushNotificationsAnalytics @@ -41,8 +41,7 @@ public void RecordPushTokenUpdated(string pushToken) { "clientVersion", m_AnalyticsPlatformWrapper.ApplicationVersion() }, { "sdkVersion", SdkVersion.SDK_VERSION }, { "sdkMethod", "com.unity.services.pushNotifications.PushNotificationsAnalytics.RecordPushTokenUpdated" }, - { "platform", m_AnalyticsPlatformWrapper.AnalyticsPlatform() }, - { "userCountry", m_AnalyticsPlatformWrapper.UserCountry() } + { "platform", m_AnalyticsPlatformWrapper.AnalyticsPlatform() } }; RuntimePlatform runtimePlatform = m_AnalyticsPlatformWrapper.RuntimePlatform(); @@ -72,8 +71,7 @@ public void RecordNotificationOpened(Dictionary payload, bool di { "clientVersion", m_AnalyticsPlatformWrapper.ApplicationVersion() }, { "sdkVersion", SdkVersion.SDK_VERSION }, { "sdkMethod", "com.unity.services.pushNotifications.PushNotificationsAnalytics.RecordNotificationOpened" }, - { "platform", m_AnalyticsPlatformWrapper.AnalyticsPlatform() }, - { "userCountry", m_AnalyticsPlatformWrapper.UserCountry() } + { "platform", m_AnalyticsPlatformWrapper.AnalyticsPlatform() } }; bool insertCommunicationAttrs = false; diff --git a/Runtime/Analytics/PushNotificationsAnalyticsPlatformWrapper.cs b/Runtime/Analytics/PushNotificationsAnalyticsPlatformWrapper.cs index 8542494..8657491 100644 --- a/Runtime/Analytics/PushNotificationsAnalyticsPlatformWrapper.cs +++ b/Runtime/Analytics/PushNotificationsAnalyticsPlatformWrapper.cs @@ -1,3 +1,5 @@ +using System; +using Unity.Services.Analytics.Internal; using UnityEngine; namespace Unity.Services.PushNotifications @@ -8,11 +10,12 @@ interface IPushNotificationAnalyticsPlatformWrapper RuntimePlatform RuntimePlatform(); bool IsApplicationFocused(); string AnalyticsPlatform(); - string UserCountry(); } class PushNotificationsAnalyticsPlatformWrapper: IPushNotificationAnalyticsPlatformWrapper { + const string k_UnknownCountryCode = "ZZ"; + public string ApplicationVersion() { return Application.version; @@ -38,10 +41,5 @@ public string AnalyticsPlatform() return "UNKNOWN"; #endif } - - public string UserCountry() - { - return "GB"; - } } } diff --git a/Tests/Runtime/MockPlatformWrapper.cs b/Tests/Runtime/MockPlatformWrapper.cs index 9ae1dc6..ad2706a 100644 --- a/Tests/Runtime/MockPlatformWrapper.cs +++ b/Tests/Runtime/MockPlatformWrapper.cs @@ -7,7 +7,6 @@ class MockPlatformWrapper: IPushNotificationAnalyticsPlatformWrapper public const string mockApplicationVersion = "1.0.0"; public RuntimePlatform mockRuntimePlatform = UnityEngine.RuntimePlatform.Android; public const string mockAnalyticsPlatform = "IPHONE"; - public const string mockUserCountry = "UK"; public bool mockIsApplicationFocused = true; public string ApplicationVersion() @@ -25,11 +24,6 @@ public string AnalyticsPlatform() return mockAnalyticsPlatform; } - public string UserCountry() - { - return mockUserCountry; - } - public bool IsApplicationFocused() { return mockIsApplicationFocused; diff --git a/Tests/Runtime/PushNotificationAnalyticsTest.cs b/Tests/Runtime/PushNotificationAnalyticsTest.cs index 182a050..3166d41 100644 --- a/Tests/Runtime/PushNotificationAnalyticsTest.cs +++ b/Tests/Runtime/PushNotificationAnalyticsTest.cs @@ -44,7 +44,6 @@ public void WhenPushTokenIsUpdatedAndThePlatformIsIOSRecordTheRightData() Dictionary calledParams = m_MockEventWrapper.LastCalledParams; Assert.AreEqual(MockPlatformWrapper.mockApplicationVersion, calledParams["clientVersion"]); Assert.AreEqual(MockPlatformWrapper.mockAnalyticsPlatform, calledParams["platform"]); - Assert.AreEqual(MockPlatformWrapper.mockUserCountry, calledParams["userCountry"]); Assert.AreEqual(SdkVersion.SDK_VERSION, calledParams["sdkVersion"]); Assert.AreEqual("com.unity.services.pushNotifications.PushNotificationsAnalytics.RecordPushTokenUpdated", calledParams["sdkMethod"]); Assert.AreEqual(token, calledParams["pushNotificationToken"]); @@ -64,7 +63,6 @@ public void WhenPushTokenIsUpdatedAndThePlatformIsAppleTVRecordTheRightData() Dictionary calledParams = m_MockEventWrapper.LastCalledParams; Assert.AreEqual(MockPlatformWrapper.mockApplicationVersion, calledParams["clientVersion"]); Assert.AreEqual(MockPlatformWrapper.mockAnalyticsPlatform, calledParams["platform"]); - Assert.AreEqual(MockPlatformWrapper.mockUserCountry, calledParams["userCountry"]); Assert.AreEqual(SdkVersion.SDK_VERSION, calledParams["sdkVersion"]); Assert.AreEqual("com.unity.services.pushNotifications.PushNotificationsAnalytics.RecordPushTokenUpdated", calledParams["sdkMethod"]); Assert.AreEqual(token, calledParams["pushNotificationToken"]); @@ -84,7 +82,6 @@ public void WhenPushTokenIsUpdatedAndThePlatformIsAndroidRecordTheRightData() Dictionary calledParams = m_MockEventWrapper.LastCalledParams; Assert.AreEqual(MockPlatformWrapper.mockApplicationVersion, calledParams["clientVersion"]); Assert.AreEqual(MockPlatformWrapper.mockAnalyticsPlatform, calledParams["platform"]); - Assert.AreEqual(MockPlatformWrapper.mockUserCountry, calledParams["userCountry"]); Assert.AreEqual(SdkVersion.SDK_VERSION, calledParams["sdkVersion"]); Assert.AreEqual("com.unity.services.pushNotifications.PushNotificationsAnalytics.RecordPushTokenUpdated", calledParams["sdkMethod"]); Assert.AreEqual(token, calledParams["androidRegistrationID"]); @@ -101,7 +98,6 @@ public void WhenNotificationOpenedIsCalledWithFullDataAndDidLaunchTheRightFields Dictionary calledParams = m_MockEventWrapper.LastCalledParams; Assert.AreEqual(MockPlatformWrapper.mockApplicationVersion, calledParams["clientVersion"]); Assert.AreEqual(MockPlatformWrapper.mockAnalyticsPlatform, calledParams["platform"]); - Assert.AreEqual(MockPlatformWrapper.mockUserCountry, calledParams["userCountry"]); Assert.AreEqual(SdkVersion.SDK_VERSION, calledParams["sdkVersion"]); Assert.AreEqual("com.unity.services.pushNotifications.PushNotificationsAnalytics.RecordNotificationOpened", calledParams["sdkMethod"]); Assert.AreEqual(true, calledParams["notificationLaunch"]); @@ -125,7 +121,6 @@ public void WhenNotificationOpenedIsCalledWithMinimalDataAndDidLaunchTheRightFie Dictionary calledParams = m_MockEventWrapper.LastCalledParams; Assert.AreEqual(MockPlatformWrapper.mockApplicationVersion, calledParams["clientVersion"]); Assert.AreEqual(MockPlatformWrapper.mockAnalyticsPlatform, calledParams["platform"]); - Assert.AreEqual(MockPlatformWrapper.mockUserCountry, calledParams["userCountry"]); Assert.AreEqual(SdkVersion.SDK_VERSION, calledParams["sdkVersion"]); Assert.AreEqual("com.unity.services.pushNotifications.PushNotificationsAnalytics.RecordNotificationOpened", calledParams["sdkMethod"]); Assert.AreEqual(true, calledParams["notificationLaunch"]); @@ -143,7 +138,6 @@ public void WhenNotificationOpenedIsCalledWithMinimalDataAndDidNotLaunchTheRight Dictionary calledParams = m_MockEventWrapper.LastCalledParams; Assert.AreEqual(MockPlatformWrapper.mockApplicationVersion, calledParams["clientVersion"]); Assert.AreEqual(MockPlatformWrapper.mockAnalyticsPlatform, calledParams["platform"]); - Assert.AreEqual(MockPlatformWrapper.mockUserCountry, calledParams["userCountry"]); Assert.AreEqual(SdkVersion.SDK_VERSION, calledParams["sdkVersion"]); Assert.AreEqual("com.unity.services.pushNotifications.PushNotificationsAnalytics.RecordNotificationOpened", calledParams["sdkMethod"]); Assert.AreEqual(false, calledParams.ContainsValue("notificationLaunch")); diff --git a/package.json b/package.json index f4b335c..4424377 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "com.unity.services.push-notifications", "displayName": "Push Notifications", - "version": "1.0.0-pre.3", + "version": "1.0.0-pre.4", "unity": "2020.3", "description": "This package adds support for Push Notifications to your game. It allows sending rich push notifications with images, and provides analytics on the number of received push notifications.", "dependencies": { - "com.unity.services.analytics": "2.0.7-pre.2", + "com.unity.services.analytics": "2.0.7-pre.6", "com.unity.nuget.newtonsoft-json": "2.0.0", "com.unity.services.core": "1.1.0-pre.8" }, @@ -17,11 +17,11 @@ } ], "upmCi": { - "footprint": "9d6c795c8bd032072185cb9105b9e2c5af550356" + "footprint": "83669ea32462b5b183f92df38eb96df64c4e1f2f" }, "repository": { "url": "https://github.cds.internal.unity3d.com/unity/Catapult.mono.git", "type": "git", - "revision": "24e0850287ee78608686d6fe92bf0526a965afd4" + "revision": "51276eb7d2448aa9beb59c7ecbb641b0d16a6159" } }