From c10bb56cc74f981463c7d1844b71a2a009e43578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20R=C4=B1za=20Kat?= Date: Thu, 21 Mar 2024 13:50:30 +0300 Subject: [PATCH 1/2] Added Warning, Updated Example Scene Script --- Assets/Countly/Example/Scripts/UserDetail.cs | 17 +++-------------- .../CountlySDK/Services/AbstractBaseService.cs | 7 +++++++ 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/Assets/Countly/Example/Scripts/UserDetail.cs b/Assets/Countly/Example/Scripts/UserDetail.cs index b27e56cc..19203f91 100644 --- a/Assets/Countly/Example/Scripts/UserDetail.cs +++ b/Assets/Countly/Example/Scripts/UserDetail.cs @@ -30,12 +30,11 @@ public async void SetUserDetail() public async void SetCustomUserDetail() { - Dictionary userCustomDetail = null; - - Countly.Instance.UserDetails.SetCustomUserDetails(userCustomDetail); - userCustomDetail = new Dictionary { + Dictionary userCustomDetail = new Dictionary { { "Language", "English" }, { "Height", "5.9" }, + { "Empty Value", "" }, // valid + { "Null Value", null } // invalid }; Countly.Instance.UserDetails.SetCustomUserDetails(userCustomDetail); @@ -46,56 +45,48 @@ public async void SetPropertyOnce() { Countly.Instance.UserDetails.SetOnce("Distance", "10KM"); await Countly.Instance.UserDetails.SaveAsync(); - } public async void IncrementValue() { Countly.Instance.UserDetails.Increment("Weight"); await Countly.Instance.UserDetails.SaveAsync(); - } public async void IncrementBy() { Countly.Instance.UserDetails.IncrementBy("ShoeSize", 2); await Countly.Instance.UserDetails.SaveAsync(); - } public async void Multiply() { Countly.Instance.UserDetails.Multiply("PetNumber", 2); await Countly.Instance.UserDetails.SaveAsync(); - } public async void Max() { Countly.Instance.UserDetails.Max("TravelDistance", 90); await Countly.Instance.UserDetails.SaveAsync(); - } public async void Min() { Countly.Instance.UserDetails.Min("YearsExperience", 10); await Countly.Instance.UserDetails.SaveAsync(); - } public async void Push() { Countly.Instance.UserDetails.Push("Area", new string[] { "width", "height" }); await Countly.Instance.UserDetails.SaveAsync(); - } public async void PushUnique() { Countly.Instance.UserDetails.PushUnique("Mole", new string[] { "Left Cheek", "Right Cheek" }); await Countly.Instance.UserDetails.SaveAsync(); - } public async void Pull() @@ -103,7 +94,6 @@ public async void Pull() //Remove one or many values Countly.Instance.UserDetails.Pull("Cat", new string[] { "Claw" }); await Countly.Instance.UserDetails.SaveAsync(); - } public async void RecordMultiple() @@ -113,6 +103,5 @@ public async void RecordMultiple() Countly.Instance.UserDetails.SetOnce("FavoriteColor", "Blue"); Countly.Instance.UserDetails.Push("Inventory", new string[] { "Sword", "Shield", "Armor" }); await Countly.Instance.UserDetails.SaveAsync(); - } } diff --git a/Assets/Countly/Plugins/CountlySDK/Services/AbstractBaseService.cs b/Assets/Countly/Plugins/CountlySDK/Services/AbstractBaseService.cs index 8f4c6d86..2ec402e8 100644 --- a/Assets/Countly/Plugins/CountlySDK/Services/AbstractBaseService.cs +++ b/Assets/Countly/Plugins/CountlySDK/Services/AbstractBaseService.cs @@ -103,6 +103,13 @@ protected IDictionary FixSegmentKeysAndValues(IDictionary Date: Mon, 25 Mar 2024 14:35:58 +0300 Subject: [PATCH 2/2] Updated logs and if checks --- .../CountlySDK/Services/AbstractBaseService.cs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Assets/Countly/Plugins/CountlySDK/Services/AbstractBaseService.cs b/Assets/Countly/Plugins/CountlySDK/Services/AbstractBaseService.cs index 2ec402e8..e8627d6a 100644 --- a/Assets/Countly/Plugins/CountlySDK/Services/AbstractBaseService.cs +++ b/Assets/Countly/Plugins/CountlySDK/Services/AbstractBaseService.cs @@ -102,14 +102,12 @@ protected IDictionary FixSegmentKeysAndValues(IDictionary