Skip to content

Commit 4f7b049

Browse files
authored
Merge pull request #14 from notifo-io/do-not-cache-settings
Do not cache settings.
2 parents fb15b7b + c067ca7 commit 4f7b049

File tree

94 files changed

+6630
-2725
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+6630
-2725
lines changed

Notifo.sln

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sample", "sample", "{4270D4
1111
EndProject
1212
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{514F5B61-451C-41EA-801F-9AE1B052A971}"
1313
EndProject
14-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Notifo.SDK.UnitTests", "tests\Notifo.SDK.UnitTests\Notifo.SDK.UnitTests.csproj", "{1F863C31-C0C7-42F7-9609-B122866B6356}"
15-
EndProject
1614
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Notifo.SDK.Core", "sdk\Notifo.SDK\Notifo.SDK.Core.csproj", "{4F928A67-C5E7-44E2-BE71-6ED155AFED9C}"
1715
EndProject
1816
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sdk", "sdk", "{4D2C377A-D9F6-4EF3-A342-1B5A84F391DB}"
@@ -32,6 +30,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.iOS.Shared", "sample
3230
EndProject
3331
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Notifo.SDK.Worker", "sdk\Notifo.SDK.Worker\Notifo.SDK.Worker.csproj", "{938B1A56-1C33-40CB-8569-8625997945C8}"
3432
EndProject
33+
Project("{9344BDBB-3E7F-41FC-A0DD-8665D75EE146}") = "Notifo.SDK.UnitTests", "tests\Notifo.SDK.UnitTests\Notifo.SDK.UnitTests.csproj", "{A5CE866E-E762-4A36-BC4D-4CB6ACB53F2B}"
34+
EndProject
3535
Global
3636
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3737
Debug|Any CPU = Debug|Any CPU
@@ -78,18 +78,6 @@ Global
7878
{DD43F8B0-1925-477A-9FF5-BE3E01350E30}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
7979
{DD43F8B0-1925-477A-9FF5-BE3E01350E30}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
8080
{DD43F8B0-1925-477A-9FF5-BE3E01350E30}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
81-
{1F863C31-C0C7-42F7-9609-B122866B6356}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
82-
{1F863C31-C0C7-42F7-9609-B122866B6356}.Debug|Any CPU.Build.0 = Debug|Any CPU
83-
{1F863C31-C0C7-42F7-9609-B122866B6356}.Debug|iPhone.ActiveCfg = Debug|Any CPU
84-
{1F863C31-C0C7-42F7-9609-B122866B6356}.Debug|iPhone.Build.0 = Debug|Any CPU
85-
{1F863C31-C0C7-42F7-9609-B122866B6356}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
86-
{1F863C31-C0C7-42F7-9609-B122866B6356}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
87-
{1F863C31-C0C7-42F7-9609-B122866B6356}.Release|Any CPU.ActiveCfg = Release|Any CPU
88-
{1F863C31-C0C7-42F7-9609-B122866B6356}.Release|Any CPU.Build.0 = Release|Any CPU
89-
{1F863C31-C0C7-42F7-9609-B122866B6356}.Release|iPhone.ActiveCfg = Release|Any CPU
90-
{1F863C31-C0C7-42F7-9609-B122866B6356}.Release|iPhone.Build.0 = Release|Any CPU
91-
{1F863C31-C0C7-42F7-9609-B122866B6356}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
92-
{1F863C31-C0C7-42F7-9609-B122866B6356}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
9381
{4F928A67-C5E7-44E2-BE71-6ED155AFED9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
9482
{4F928A67-C5E7-44E2-BE71-6ED155AFED9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
9583
{4F928A67-C5E7-44E2-BE71-6ED155AFED9C}.Debug|iPhone.ActiveCfg = Debug|Any CPU
@@ -118,7 +106,6 @@ Global
118106
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Debug|Any CPU.Build.0 = Debug|Any CPU
119107
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
120108
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Debug|iPhone.ActiveCfg = Debug|Any CPU
121-
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Debug|iPhone.Build.0 = Debug|Any CPU
122109
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Debug|iPhone.Deploy.0 = Debug|Any CPU
123110
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
124111
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
@@ -127,7 +114,6 @@ Global
127114
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Release|Any CPU.Build.0 = Release|Any CPU
128115
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Release|Any CPU.Deploy.0 = Release|Any CPU
129116
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Release|iPhone.ActiveCfg = Release|Any CPU
130-
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Release|iPhone.Build.0 = Release|Any CPU
131117
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Release|iPhone.Deploy.0 = Release|Any CPU
132118
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
133119
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
@@ -168,20 +154,32 @@ Global
168154
{938B1A56-1C33-40CB-8569-8625997945C8}.Release|iPhone.Build.0 = Release|Any CPU
169155
{938B1A56-1C33-40CB-8569-8625997945C8}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
170156
{938B1A56-1C33-40CB-8569-8625997945C8}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
157+
{A5CE866E-E762-4A36-BC4D-4CB6ACB53F2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
158+
{A5CE866E-E762-4A36-BC4D-4CB6ACB53F2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
159+
{A5CE866E-E762-4A36-BC4D-4CB6ACB53F2B}.Debug|iPhone.ActiveCfg = Debug|Any CPU
160+
{A5CE866E-E762-4A36-BC4D-4CB6ACB53F2B}.Debug|iPhone.Build.0 = Debug|Any CPU
161+
{A5CE866E-E762-4A36-BC4D-4CB6ACB53F2B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
162+
{A5CE866E-E762-4A36-BC4D-4CB6ACB53F2B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
163+
{A5CE866E-E762-4A36-BC4D-4CB6ACB53F2B}.Release|Any CPU.ActiveCfg = Release|Any CPU
164+
{A5CE866E-E762-4A36-BC4D-4CB6ACB53F2B}.Release|Any CPU.Build.0 = Release|Any CPU
165+
{A5CE866E-E762-4A36-BC4D-4CB6ACB53F2B}.Release|iPhone.ActiveCfg = Release|Any CPU
166+
{A5CE866E-E762-4A36-BC4D-4CB6ACB53F2B}.Release|iPhone.Build.0 = Release|Any CPU
167+
{A5CE866E-E762-4A36-BC4D-4CB6ACB53F2B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
168+
{A5CE866E-E762-4A36-BC4D-4CB6ACB53F2B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
171169
EndGlobalSection
172170
GlobalSection(SolutionProperties) = preSolution
173171
HideSolutionNode = FALSE
174172
EndGlobalSection
175173
GlobalSection(NestedProjects) = preSolution
176174
{2536F86F-CA74-469A-AFAC-A8BE7B71CED3} = {4270D4B1-5081-4E4F-8BDF-61ED888E936E}
177175
{DD43F8B0-1925-477A-9FF5-BE3E01350E30} = {4270D4B1-5081-4E4F-8BDF-61ED888E936E}
178-
{1F863C31-C0C7-42F7-9609-B122866B6356} = {514F5B61-451C-41EA-801F-9AE1B052A971}
179176
{4F928A67-C5E7-44E2-BE71-6ED155AFED9C} = {4D2C377A-D9F6-4EF3-A342-1B5A84F391DB}
180177
{258DEE06-BB0D-404B-B981-43B091744BD3} = {4D2C377A-D9F6-4EF3-A342-1B5A84F391DB}
181178
{C4EF6311-9993-40BD-BEF8-3C495F571302} = {4270D4B1-5081-4E4F-8BDF-61ED888E936E}
182179
{1B35BAEA-5666-408C-BED4-DB6114F3070E} = {4270D4B1-5081-4E4F-8BDF-61ED888E936E}
183180
{7D4A0E79-8075-42A6-ACC5-E5B666F75313} = {4270D4B1-5081-4E4F-8BDF-61ED888E936E}
184181
{938B1A56-1C33-40CB-8569-8625997945C8} = {4D2C377A-D9F6-4EF3-A342-1B5A84F391DB}
182+
{A5CE866E-E762-4A36-BC4D-4CB6ACB53F2B} = {514F5B61-451C-41EA-801F-9AE1B052A971}
185183
EndGlobalSection
186184
GlobalSection(ExtensibilityGlobals) = postSolution
187185
SolutionGuid = {87BCC08F-EAE5-4433-97FE-0DE5A56DBF78}

UpgradeLog.htm

Lines changed: 0 additions & 284 deletions
This file was deleted.

sample/Sample.Android/MainActivity.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using Android.Content.PM;
1111
using Android.OS;
1212
using Android.Runtime;
13+
using Notifo.SDK;
1314
using Notifo.SDK.FirebasePlugin;
1415
using Prism;
1516
using Prism.Ioc;
@@ -30,13 +31,13 @@ protected override void OnCreate(Bundle savedInstanceState)
3031
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
3132
LoadApplication(new App(new AndroidInitializer()));
3233

33-
NotifoFirebasePlugin.ProcessIntent(this, Intent);
34+
NotifoIO.Current.ProcessIntent(this, Intent);
3435
}
3536

3637
protected override void OnNewIntent(Intent intent)
3738
{
3839
base.OnNewIntent(intent);
39-
NotifoFirebasePlugin.ProcessIntent(this, intent);
40+
NotifoIO.Current.ProcessIntent(this, intent);
4041
}
4142

4243
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Permission[] grantResults)

sample/Sample.Android/MainApplication.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using Android.App;
1010
using Android.OS;
1111
using Android.Runtime;
12+
using Notifo.SDK;
1213
using Notifo.SDK.FirebasePlugin;
1314
using Plugin.FirebasePushNotification;
1415

@@ -31,11 +32,15 @@ public override void OnCreate()
3132
FirebasePushNotificationManager.DefaultNotificationChannelId = "FirebasePushNotificationChannel";
3233
FirebasePushNotificationManager.DefaultNotificationChannelName = "General";
3334
}
35+
36+
var resetToken = false;
3437
#if DEBUG
35-
NotifoFirebasePlugin.Initialize(this, new NotifoStartup(), new NotificationHandler(), resetToken: true);
36-
#else
37-
NotifoFirebasePlugin.Initialize(this, new NotifoStartup(), new NotificationHandler(), resetToken: false);
38+
resetToken = true;
3839
#endif
40+
NotifoIO.Current
41+
.SetNotificationHandler(new NotificationHandler())
42+
.UseDefaults()
43+
.UseFirebasePluginEventsProvider(this, resetToken: resetToken);
3944
}
4045
}
4146
}

sample/Sample.Android/NotificationHandler.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
// All rights reserved. Licensed under the MIT license.
66
// ==========================================================================
77

8+
using System.Threading;
9+
using System.Threading.Tasks;
810
using Android.App;
911
using Android.Content;
1012
using Android.OS;
@@ -15,16 +17,18 @@ namespace Sample.Droid
1517
{
1618
public class NotificationHandler : INotificationHandler
1719
{
18-
public void OnBuildNotification(NotificationCompat.Builder notificationBuilder, UserNotificationDto notification)
20+
public Task OnBuildNotificationAsync(NotificationCompat.Builder notificationBuilder, UserNotificationDto notification,
21+
CancellationToken ct)
1922
{
2023
if (Build.VERSION.SdkInt >= BuildVersionCodes.O)
2124
{
22-
return;
25+
return Task.CompletedTask;
2326
}
2427

2528
var soundUri = Android.Net.Uri.Parse($"{ContentResolver.SchemeAndroidResource}://{Application.Context.PackageName}/raw/announcement");
2629

2730
notificationBuilder.SetSound(soundUri);
31+
return Task.CompletedTask;
2832
}
2933
}
3034
}

0 commit comments

Comments
 (0)