diff --git a/OneSignal.sln b/OneSignal.sln
index f799f089..de66c955 100644
--- a/OneSignal.sln
+++ b/OneSignal.sln
@@ -1,3 +1,4 @@
+
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27428.2015
@@ -29,142 +30,251 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OneSignalSDK.DotNet.Android
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OneSignalSDK.DotNet.Android.Notifications.Binding", "OneSignalSDK.DotNet.Android.Notifications.Binding\OneSignalSDK.DotNet.Android.Notifications.Binding.csproj", "{C3A89BD5-ABBE-4F91-8C02-7723A49BF042}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{B36A84DF-456D-A817-6EDD-3EC3E7F6E11F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "demo", "examples\demo\demo.csproj", "{D0DA843E-E87E-4FA1-AB55-F8BE209845CD}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|iPhone = Debug|iPhone
Debug|iPhoneSimulator = Debug|iPhoneSimulator
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|iPhone = Release|iPhone
Release|iPhoneSimulator = Release|iPhoneSimulator
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Debug|iPhone.Build.0 = Debug|Any CPU
{5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Debug|x64.Build.0 = Debug|Any CPU
+ {5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Debug|x86.Build.0 = Debug|Any CPU
{5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Release|Any CPU.Build.0 = Release|Any CPU
{5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Release|iPhone.ActiveCfg = Release|Any CPU
{5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Release|iPhone.Build.0 = Release|Any CPU
{5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
- {5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Release|x64.ActiveCfg = Release|Any CPU
+ {5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Release|x64.Build.0 = Release|Any CPU
+ {5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Release|x86.ActiveCfg = Release|Any CPU
+ {5FF66A21-BA7B-48FD-8A7D-6A1092066306}.Release|x86.Build.0 = Release|Any CPU
{FB0C2961-BAFE-4346-B279-3B3941614DCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FB0C2961-BAFE-4346-B279-3B3941614DCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FB0C2961-BAFE-4346-B279-3B3941614DCD}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{FB0C2961-BAFE-4346-B279-3B3941614DCD}.Debug|iPhone.Build.0 = Debug|Any CPU
{FB0C2961-BAFE-4346-B279-3B3941614DCD}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{FB0C2961-BAFE-4346-B279-3B3941614DCD}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {FB0C2961-BAFE-4346-B279-3B3941614DCD}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {FB0C2961-BAFE-4346-B279-3B3941614DCD}.Debug|x64.Build.0 = Debug|Any CPU
+ {FB0C2961-BAFE-4346-B279-3B3941614DCD}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {FB0C2961-BAFE-4346-B279-3B3941614DCD}.Debug|x86.Build.0 = Debug|Any CPU
{FB0C2961-BAFE-4346-B279-3B3941614DCD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FB0C2961-BAFE-4346-B279-3B3941614DCD}.Release|Any CPU.Build.0 = Release|Any CPU
{FB0C2961-BAFE-4346-B279-3B3941614DCD}.Release|iPhone.ActiveCfg = Release|Any CPU
{FB0C2961-BAFE-4346-B279-3B3941614DCD}.Release|iPhone.Build.0 = Release|Any CPU
{FB0C2961-BAFE-4346-B279-3B3941614DCD}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{FB0C2961-BAFE-4346-B279-3B3941614DCD}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
- {FB0C2961-BAFE-4346-B279-3B3941614DCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FB0C2961-BAFE-4346-B279-3B3941614DCD}.Release|x64.ActiveCfg = Release|Any CPU
+ {FB0C2961-BAFE-4346-B279-3B3941614DCD}.Release|x64.Build.0 = Release|Any CPU
+ {FB0C2961-BAFE-4346-B279-3B3941614DCD}.Release|x86.ActiveCfg = Release|Any CPU
+ {FB0C2961-BAFE-4346-B279-3B3941614DCD}.Release|x86.Build.0 = Release|Any CPU
{D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Debug|iPhone.Build.0 = Debug|Any CPU
{D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Debug|x64.Build.0 = Debug|Any CPU
+ {D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Debug|x86.Build.0 = Debug|Any CPU
{D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Release|Any CPU.Build.0 = Release|Any CPU
{D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Release|iPhone.ActiveCfg = Release|Any CPU
{D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Release|iPhone.Build.0 = Release|Any CPU
{D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
- {D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Release|x64.ActiveCfg = Release|Any CPU
+ {D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Release|x64.Build.0 = Release|Any CPU
+ {D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Release|x86.ActiveCfg = Release|Any CPU
+ {D0FE8BC3-4B5F-45CC-B9F2-1795CB136BB0}.Release|x86.Build.0 = Release|Any CPU
{9144F592-91B9-4ACA-BC3C-D771F8319996}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9144F592-91B9-4ACA-BC3C-D771F8319996}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9144F592-91B9-4ACA-BC3C-D771F8319996}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{9144F592-91B9-4ACA-BC3C-D771F8319996}.Debug|iPhone.Build.0 = Debug|Any CPU
{9144F592-91B9-4ACA-BC3C-D771F8319996}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{9144F592-91B9-4ACA-BC3C-D771F8319996}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {9144F592-91B9-4ACA-BC3C-D771F8319996}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {9144F592-91B9-4ACA-BC3C-D771F8319996}.Debug|x64.Build.0 = Debug|Any CPU
+ {9144F592-91B9-4ACA-BC3C-D771F8319996}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {9144F592-91B9-4ACA-BC3C-D771F8319996}.Debug|x86.Build.0 = Debug|Any CPU
{9144F592-91B9-4ACA-BC3C-D771F8319996}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9144F592-91B9-4ACA-BC3C-D771F8319996}.Release|Any CPU.Build.0 = Release|Any CPU
{9144F592-91B9-4ACA-BC3C-D771F8319996}.Release|iPhone.ActiveCfg = Release|Any CPU
{9144F592-91B9-4ACA-BC3C-D771F8319996}.Release|iPhone.Build.0 = Release|Any CPU
{9144F592-91B9-4ACA-BC3C-D771F8319996}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{9144F592-91B9-4ACA-BC3C-D771F8319996}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
- {9144F592-91B9-4ACA-BC3C-D771F8319996}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9144F592-91B9-4ACA-BC3C-D771F8319996}.Release|x64.ActiveCfg = Release|Any CPU
+ {9144F592-91B9-4ACA-BC3C-D771F8319996}.Release|x64.Build.0 = Release|Any CPU
+ {9144F592-91B9-4ACA-BC3C-D771F8319996}.Release|x86.ActiveCfg = Release|Any CPU
+ {9144F592-91B9-4ACA-BC3C-D771F8319996}.Release|x86.Build.0 = Release|Any CPU
{967EAABD-4A79-4762-9848-0D5530AA1FA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {967EAABD-4A79-4762-9848-0D5530AA1FA5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{967EAABD-4A79-4762-9848-0D5530AA1FA5}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{967EAABD-4A79-4762-9848-0D5530AA1FA5}.Debug|iPhone.Build.0 = Debug|Any CPU
{967EAABD-4A79-4762-9848-0D5530AA1FA5}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{967EAABD-4A79-4762-9848-0D5530AA1FA5}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {967EAABD-4A79-4762-9848-0D5530AA1FA5}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {967EAABD-4A79-4762-9848-0D5530AA1FA5}.Debug|x64.Build.0 = Debug|Any CPU
+ {967EAABD-4A79-4762-9848-0D5530AA1FA5}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {967EAABD-4A79-4762-9848-0D5530AA1FA5}.Debug|x86.Build.0 = Debug|Any CPU
{967EAABD-4A79-4762-9848-0D5530AA1FA5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{967EAABD-4A79-4762-9848-0D5530AA1FA5}.Release|Any CPU.Build.0 = Release|Any CPU
{967EAABD-4A79-4762-9848-0D5530AA1FA5}.Release|iPhone.ActiveCfg = Release|Any CPU
{967EAABD-4A79-4762-9848-0D5530AA1FA5}.Release|iPhone.Build.0 = Release|Any CPU
{967EAABD-4A79-4762-9848-0D5530AA1FA5}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{967EAABD-4A79-4762-9848-0D5530AA1FA5}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
- {967EAABD-4A79-4762-9848-0D5530AA1FA5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {967EAABD-4A79-4762-9848-0D5530AA1FA5}.Release|x64.ActiveCfg = Release|Any CPU
+ {967EAABD-4A79-4762-9848-0D5530AA1FA5}.Release|x64.Build.0 = Release|Any CPU
+ {967EAABD-4A79-4762-9848-0D5530AA1FA5}.Release|x86.ActiveCfg = Release|Any CPU
+ {967EAABD-4A79-4762-9848-0D5530AA1FA5}.Release|x86.Build.0 = Release|Any CPU
{4A02EC63-E524-402B-8FD3-484FEFB172A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4A02EC63-E524-402B-8FD3-484FEFB172A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4A02EC63-E524-402B-8FD3-484FEFB172A1}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{4A02EC63-E524-402B-8FD3-484FEFB172A1}.Debug|iPhone.Build.0 = Debug|Any CPU
{4A02EC63-E524-402B-8FD3-484FEFB172A1}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{4A02EC63-E524-402B-8FD3-484FEFB172A1}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {4A02EC63-E524-402B-8FD3-484FEFB172A1}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {4A02EC63-E524-402B-8FD3-484FEFB172A1}.Debug|x64.Build.0 = Debug|Any CPU
+ {4A02EC63-E524-402B-8FD3-484FEFB172A1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {4A02EC63-E524-402B-8FD3-484FEFB172A1}.Debug|x86.Build.0 = Debug|Any CPU
{4A02EC63-E524-402B-8FD3-484FEFB172A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4A02EC63-E524-402B-8FD3-484FEFB172A1}.Release|Any CPU.Build.0 = Release|Any CPU
{4A02EC63-E524-402B-8FD3-484FEFB172A1}.Release|iPhone.ActiveCfg = Release|Any CPU
{4A02EC63-E524-402B-8FD3-484FEFB172A1}.Release|iPhone.Build.0 = Release|Any CPU
{4A02EC63-E524-402B-8FD3-484FEFB172A1}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{4A02EC63-E524-402B-8FD3-484FEFB172A1}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
- {4A02EC63-E524-402B-8FD3-484FEFB172A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4A02EC63-E524-402B-8FD3-484FEFB172A1}.Release|x64.ActiveCfg = Release|Any CPU
+ {4A02EC63-E524-402B-8FD3-484FEFB172A1}.Release|x64.Build.0 = Release|Any CPU
+ {4A02EC63-E524-402B-8FD3-484FEFB172A1}.Release|x86.ActiveCfg = Release|Any CPU
+ {4A02EC63-E524-402B-8FD3-484FEFB172A1}.Release|x86.Build.0 = Release|Any CPU
{09E95817-B1DF-4D4A-BEC3-3A640650637B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {09E95817-B1DF-4D4A-BEC3-3A640650637B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09E95817-B1DF-4D4A-BEC3-3A640650637B}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{09E95817-B1DF-4D4A-BEC3-3A640650637B}.Debug|iPhone.Build.0 = Debug|Any CPU
{09E95817-B1DF-4D4A-BEC3-3A640650637B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{09E95817-B1DF-4D4A-BEC3-3A640650637B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {09E95817-B1DF-4D4A-BEC3-3A640650637B}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {09E95817-B1DF-4D4A-BEC3-3A640650637B}.Debug|x64.Build.0 = Debug|Any CPU
+ {09E95817-B1DF-4D4A-BEC3-3A640650637B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {09E95817-B1DF-4D4A-BEC3-3A640650637B}.Debug|x86.Build.0 = Debug|Any CPU
{09E95817-B1DF-4D4A-BEC3-3A640650637B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{09E95817-B1DF-4D4A-BEC3-3A640650637B}.Release|Any CPU.Build.0 = Release|Any CPU
{09E95817-B1DF-4D4A-BEC3-3A640650637B}.Release|iPhone.ActiveCfg = Release|Any CPU
{09E95817-B1DF-4D4A-BEC3-3A640650637B}.Release|iPhone.Build.0 = Release|Any CPU
{09E95817-B1DF-4D4A-BEC3-3A640650637B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{09E95817-B1DF-4D4A-BEC3-3A640650637B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
- {09E95817-B1DF-4D4A-BEC3-3A640650637B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {09E95817-B1DF-4D4A-BEC3-3A640650637B}.Release|x64.ActiveCfg = Release|Any CPU
+ {09E95817-B1DF-4D4A-BEC3-3A640650637B}.Release|x64.Build.0 = Release|Any CPU
+ {09E95817-B1DF-4D4A-BEC3-3A640650637B}.Release|x86.ActiveCfg = Release|Any CPU
+ {09E95817-B1DF-4D4A-BEC3-3A640650637B}.Release|x86.Build.0 = Release|Any CPU
{C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Debug|iPhone.Build.0 = Debug|Any CPU
{C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Debug|x64.Build.0 = Debug|Any CPU
+ {C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Debug|x86.Build.0 = Debug|Any CPU
{C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Release|Any CPU.Build.0 = Release|Any CPU
{C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Release|iPhone.ActiveCfg = Release|Any CPU
{C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Release|iPhone.Build.0 = Release|Any CPU
{C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
- {C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Release|x64.ActiveCfg = Release|Any CPU
+ {C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Release|x64.Build.0 = Release|Any CPU
+ {C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Release|x86.ActiveCfg = Release|Any CPU
+ {C6878B4B-E50C-4CE3-8A72-6AEEBCAECC8C}.Release|x86.Build.0 = Release|Any CPU
{7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Debug|iPhone.Build.0 = Debug|Any CPU
{7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Debug|x64.Build.0 = Debug|Any CPU
+ {7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Debug|x86.Build.0 = Debug|Any CPU
{7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Release|Any CPU.Build.0 = Release|Any CPU
{7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Release|iPhone.ActiveCfg = Release|Any CPU
{7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Release|iPhone.Build.0 = Release|Any CPU
{7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
- {7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Release|x64.ActiveCfg = Release|Any CPU
+ {7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Release|x64.Build.0 = Release|Any CPU
+ {7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Release|x86.ActiveCfg = Release|Any CPU
+ {7E6C2A41-0512-492B-B6D4-D904D8DB0FB9}.Release|x86.Build.0 = Release|Any CPU
{C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Debug|iPhone.Build.0 = Debug|Any CPU
{C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Debug|x64.Build.0 = Debug|Any CPU
+ {C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Debug|x86.Build.0 = Debug|Any CPU
{C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Release|Any CPU.Build.0 = Release|Any CPU
{C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Release|iPhone.ActiveCfg = Release|Any CPU
{C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Release|iPhone.Build.0 = Release|Any CPU
{C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
- {C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Release|x64.ActiveCfg = Release|Any CPU
+ {C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Release|x64.Build.0 = Release|Any CPU
+ {C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Release|x86.ActiveCfg = Release|Any CPU
+ {C3A89BD5-ABBE-4F91-8C02-7723A49BF042}.Release|x86.Build.0 = Release|Any CPU
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD}.Debug|x64.Build.0 = Debug|Any CPU
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD}.Debug|x86.Build.0 = Debug|Any CPU
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD}.Release|iPhone.Build.0 = Release|Any CPU
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD}.Release|x64.ActiveCfg = Release|Any CPU
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD}.Release|x64.Build.0 = Release|Any CPU
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD}.Release|x86.ActiveCfg = Release|Any CPU
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{09E95817-B1DF-4D4A-BEC3-3A640650637B} = {9DE071C3-1289-41AE-A45F-B4F244552BAE}
+ {D0DA843E-E87E-4FA1-AB55-F8BE209845CD} = {B36A84DF-456D-A817-6EDD-3EC3E7F6E11F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DC536039-9077-48EA-BEAB-432B3B21D933}
diff --git a/Samples/LIVE_ACTIVITIES.md b/Samples/LIVE_ACTIVITIES.md
deleted file mode 100644
index fcffd23d..00000000
--- a/Samples/LIVE_ACTIVITIES.md
+++ /dev/null
@@ -1,14 +0,0 @@
-The Live Activities functionality is disabled by default as it requires manual work for the solution to successfull build.
-This example is based off the work of https://github.com/chamons/xamarin-ios-swift-extension, which is an example of how to add a native Widget to a Xamarin application.
-
-To establish a Live Activity from a Xamarin application you must create a native LiveActivity Widget, build it natively, then import it into the Xamarin project via the `AdditionalAppExtensions` csproj target.
-
-To enable this functionality in the sample app, you must do the following on a mac:
-
-1. Run `pod install` within `Samples/native/example`.
-2. Using Xcode, open `Samples/native/example/example.xcworkspace`.
-3. Go to menu File -> Workspace Settings and change `Derived Data` to `Project-relative Location` with path `DerivedData`.
-4. Build the product for iPhone and/or the iPhoneSimulator, which will populate the `Derived Data` directory with the build output.
-5. Using Visual Studio, open `OneSignal.sln`.
-6. Within `Samples/OneSignalApp/OneSignalApp.csproj`, uncomment the block below `LIVE ACTIVITES: UNCOMMENT BELOW OUT FOR LIVE ACTIVITIES WIDGET`.
-7. Change the platform to either `iPhone` or `iPhoneSimulator`, then build/run as the startup project `OneSignalApp`!
\ No newline at end of file
diff --git a/Samples/OneSignalApp/.vscode/launch.json b/Samples/OneSignalApp/.vscode/launch.json
deleted file mode 100644
index c5c01d73..00000000
--- a/Samples/OneSignalApp/.vscode/launch.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- // Use IntelliSense to learn about possible attributes.
- // Hover to view descriptions of existing attributes.
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
- "version": "0.2.0",
- "configurations": [
- {
- "name": ".NET MAUI",
- "type": "maui",
- "request": "launch",
- "preLaunchTask": "maui: Build"
- }
- ]
-}
\ No newline at end of file
diff --git a/Samples/OneSignalApp/AddOutcomePage.xaml b/Samples/OneSignalApp/AddOutcomePage.xaml
deleted file mode 100644
index 3738ca8b..00000000
--- a/Samples/OneSignalApp/AddOutcomePage.xaml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Samples/OneSignalApp/AddOutcomePage.xaml.cs b/Samples/OneSignalApp/AddOutcomePage.xaml.cs
deleted file mode 100644
index a430c953..00000000
--- a/Samples/OneSignalApp/AddOutcomePage.xaml.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using OneSignalApp.Models;
-
-namespace OneSignalApp;
-
-public partial class AddOutcomePage : ContentPage
-{
- public AddOutcomePage()
- {
- InitializeComponent();
- }
-
- void CancelButton_Clicked(System.Object sender, System.EventArgs e)
- {
- Navigation.PopModalAsync();
- }
-
- void OkayButton_Clicked(System.Object sender, System.EventArgs e)
- {
- var pageModel = BindingContext as AddOutcomePageModel;
- if (pageModel == null)
- return;
-
- var errorMessage = pageModel.ErrorMessage;
- if (String.IsNullOrWhiteSpace(errorMessage))
- {
- pageModel.Complete();
- Navigation.PopModalAsync();
- }
- else
- {
- DisplayAlert("Error", errorMessage, "OK");
- }
- }
-}
diff --git a/Samples/OneSignalApp/AddPairPage.xaml b/Samples/OneSignalApp/AddPairPage.xaml
deleted file mode 100644
index a0198c4a..00000000
--- a/Samples/OneSignalApp/AddPairPage.xaml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Samples/OneSignalApp/AddPairPage.xaml.cs b/Samples/OneSignalApp/AddPairPage.xaml.cs
deleted file mode 100644
index 54e27cec..00000000
--- a/Samples/OneSignalApp/AddPairPage.xaml.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using OneSignalApp.Models;
-
-namespace OneSignalApp;
-
-public partial class AddPairPage : ContentPage
-{
- public AddPairPage()
- {
- InitializeComponent();
- }
-
- void CancelButton_Clicked(System.Object sender, System.EventArgs e)
- {
- Navigation.PopModalAsync();
- }
-
- void OkayButton_Clicked(System.Object sender, System.EventArgs e)
- {
- var pageModel = BindingContext as AddPairPageModel;
- if (pageModel == null)
- return;
-
- var errorMessage = pageModel.ErrorMessage;
- if (String.IsNullOrWhiteSpace(errorMessage))
- {
- pageModel.Complete();
- Navigation.PopModalAsync();
- }
- else
- {
- DisplayAlert("Error", errorMessage, "OK");
- }
- }
-}
diff --git a/Samples/OneSignalApp/App.xaml.cs b/Samples/OneSignalApp/App.xaml.cs
deleted file mode 100644
index 426fc0fa..00000000
--- a/Samples/OneSignalApp/App.xaml.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using OneSignalSDK.DotNet;
-using OneSignalSDK.DotNet.Core;
-
-namespace OneSignalApp;
-
-public partial class App : Application
-{
- public App()
- {
- InitializeComponent();
-
- MainPage = new AppShell();
- }
-}
-
diff --git a/Samples/OneSignalApp/AppShell.xaml b/Samples/OneSignalApp/AppShell.xaml
deleted file mode 100644
index 00e42fc4..00000000
--- a/Samples/OneSignalApp/AppShell.xaml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
diff --git a/Samples/OneSignalApp/AppShell.xaml.cs b/Samples/OneSignalApp/AppShell.xaml.cs
deleted file mode 100644
index d9e72dbe..00000000
--- a/Samples/OneSignalApp/AppShell.xaml.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace OneSignalApp;
-
-public partial class AppShell : Shell
-{
- public AppShell()
- {
- InitializeComponent();
- }
-}
-
diff --git a/Samples/OneSignalApp/Converters/BoolNotConverter.cs b/Samples/OneSignalApp/Converters/BoolNotConverter.cs
deleted file mode 100644
index 2163065e..00000000
--- a/Samples/OneSignalApp/Converters/BoolNotConverter.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System;
-using System.Globalization;
-
-namespace OneSignalApp.Converters
-{
- public class BoolNotConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- return !((bool)value);
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- return !((bool)value);
- }
- }
-}
-
diff --git a/Samples/OneSignalApp/MainPage.xaml b/Samples/OneSignalApp/MainPage.xaml
deleted file mode 100644
index b71c72e2..00000000
--- a/Samples/OneSignalApp/MainPage.xaml
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Samples/OneSignalApp/MainPage.xaml.cs b/Samples/OneSignalApp/MainPage.xaml.cs
deleted file mode 100644
index b0bfba6b..00000000
--- a/Samples/OneSignalApp/MainPage.xaml.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Globalization;
-
-namespace OneSignalApp;
-
-public partial class MainPage : ContentPage
-{
-
- public MainPage()
- {
- InitializeComponent();
- BindingContext = new Models.MainPageModel(this);
- }
-}
-
-
diff --git a/Samples/OneSignalApp/MauiProgram.cs b/Samples/OneSignalApp/MauiProgram.cs
deleted file mode 100644
index 32c60ca9..00000000
--- a/Samples/OneSignalApp/MauiProgram.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-namespace OneSignalApp;
-
-public static class MauiProgram
-{
- public static MauiApp CreateMauiApp()
- {
- var builder = MauiApp.CreateBuilder();
- builder
- .UseMauiApp()
- .ConfigureFonts(fonts =>
- {
- fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
- fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
- });
-
- return builder.Build();
- }
-}
-
diff --git a/Samples/OneSignalApp/Models/AddOutcomePageModel.cs b/Samples/OneSignalApp/Models/AddOutcomePageModel.cs
deleted file mode 100644
index 167059f6..00000000
--- a/Samples/OneSignalApp/Models/AddOutcomePageModel.cs
+++ /dev/null
@@ -1,107 +0,0 @@
-using System;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-using System.Windows.Input;
-using OneSignalSDK.DotNet;
-
-namespace OneSignalApp.Models
-{
- public class AddOutcomePageModel : INotifyPropertyChanged
- {
- public enum OutcomeType
- {
- Normal,
- Unique,
- WithValue
- }
-
- public event EventHandler PageCompleted;
- public event PropertyChangedEventHandler PropertyChanged;
-
- public IList Types { get; } = new List { OutcomeType.Normal, OutcomeType.Unique, OutcomeType.WithValue };
- private OutcomeType _type;
- public OutcomeType Type
- {
- get => _type;
- set
- {
- if (_type != value)
- {
- _type = value;
- OnPropertyChanged();
- OnPropertyChanged(nameof(ShouldShowValue));
- }
- }
- }
-
- public bool ShouldShowValue => Type == OutcomeType.WithValue;
-
- private string _name;
- public string Name {
- get => _name;
- set
- {
- if(_name != value)
- {
- _name = value;
- OnPropertyChanged();
- }
- }
- }
-
- private string _value;
- public string Value
- {
- get => _value;
- set
- {
- if (_value != value)
- {
- _value = value;
- OnPropertyChanged();
- OnPropertyChanged(nameof(ValueAsFloat));
- }
- }
- }
-
- public float? ValueAsFloat
- {
- get
- {
- if (!String.IsNullOrWhiteSpace(Value) && float.TryParse(Value, out var floatValue))
- {
- return floatValue;
- }
-
- return null;
- }
- }
-
- public string? ErrorMessage
- {
- get
- {
- if(String.IsNullOrWhiteSpace(Name))
- {
- return "Name must be specified";
- }
-
- if (Type == OutcomeType.WithValue && ValueAsFloat == null)
- {
- return "Value must be specified as a number";
- }
-
- return null;
- }
- }
-
- public void Complete()
- {
- PageCompleted?.Invoke(this, EventArgs.Empty);
- }
-
- private void OnPropertyChanged([CallerMemberName] string name = "") =>
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
- }
-}
-
diff --git a/Samples/OneSignalApp/Models/AddPairPageModel.cs b/Samples/OneSignalApp/Models/AddPairPageModel.cs
deleted file mode 100644
index cf3db64c..00000000
--- a/Samples/OneSignalApp/Models/AddPairPageModel.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-using System;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-using System.Windows.Input;
-using OneSignalSDK.DotNet;
-
-namespace OneSignalApp.Models
-{
- public class AddPairPageModel : INotifyPropertyChanged
- {
- public event EventHandler PageCompleted;
- public event PropertyChangedEventHandler PropertyChanged;
-
- public string TitleLabel { get; }
- public string KeyLabel { get; }
- public string ValueLabel { get; }
-
- private string _key;
- public string Key {
- get => _key;
- set
- {
- if(_key != value)
- {
- _key = value;
- OnPropertyChanged();
- }
- }
- }
-
- private string _value;
- public string Value
- {
- get => _value;
- set
- {
- if (_value != value)
- {
- _value = value;
- OnPropertyChanged();
- }
- }
- }
-
- public string? ErrorMessage
- {
- get
- {
- if (String.IsNullOrWhiteSpace(Key))
- {
- return $"${KeyLabel} must be specified";
- }
-
- if (String.IsNullOrWhiteSpace(Value))
- {
- return $"${ValueLabel} must be specified";
- }
-
- return null;
- }
- }
-
- public AddPairPageModel(string titleLabel = "Add KVP", string keyLabel = "Key", string valueLabel = "Value")
- {
- TitleLabel = titleLabel;
- KeyLabel = keyLabel;
- ValueLabel = valueLabel;
- }
-
- public void Complete()
- {
- PageCompleted?.Invoke(this, EventArgs.Empty);
- }
-
- private void OnPropertyChanged([CallerMemberName] string name = "") =>
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
- }
-}
-
diff --git a/Samples/OneSignalApp/Models/MainPageModel.cs b/Samples/OneSignalApp/Models/MainPageModel.cs
deleted file mode 100644
index 22915483..00000000
--- a/Samples/OneSignalApp/Models/MainPageModel.cs
+++ /dev/null
@@ -1,658 +0,0 @@
-using System;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.Runtime.CompilerServices;
-using System.Windows.Input;
-using OneSignalSDK.DotNet;
-using OneSignalSDK.DotNet.Core.Debug;
-using OneSignalSDK.DotNet.Core.User;
-using OneSignalSDK.DotNet.Core.User.Subscriptions;
-
-namespace OneSignalApp.Models
-{
- public class MainPageModel : INotifyPropertyChanged
- {
- public event PropertyChangedEventHandler PropertyChanged;
-
- private string _appId = "77e32082-ea27-42e3-a898-c72e141824ef";
- public string AppId {
- get => _appId;
- private set
- {
- if(_appId != value)
- {
- _appId = value;
- OnPropertyChanged();
- }
- }
- }
-
- private bool _hasGivenPrivacyConsent;
- public bool HasGivenPrivacyConsent
- {
- get => _hasGivenPrivacyConsent;
- private set
- {
- if (_hasGivenPrivacyConsent != value)
- {
- _hasGivenPrivacyConsent = value;
- OnPropertyChanged();
- }
- }
- }
-
- private string _pushSubscriptionId;
- public string PushSubscriptionId
- {
- get => _pushSubscriptionId;
- private set
- {
- if (_pushSubscriptionId != value)
- {
- _pushSubscriptionId = value;
- OnPropertyChanged();
- }
- }
- }
-
- private bool _isPushEnabled;
- public bool IsPushEnabled
- {
- get => _isPushEnabled;
- set
- {
- if (_isPushEnabled != value)
- {
- if(value && !OneSignal.User.PushSubscription.OptedIn)
- {
- OneSignal.User.PushSubscription.OptIn();
- }
- else if(!value && OneSignal.User.PushSubscription.OptedIn)
- {
- OneSignal.User.PushSubscription.OptOut();
- }
-
- _isPushEnabled = value;
- OnPropertyChanged();
- }
- }
- }
-
- private bool _hasPushPermission;
- public bool HasPushPermission
- {
- get => _hasPushPermission;
- private set
- {
- if (_hasPushPermission != value)
- {
- _hasPushPermission = value;
- OnPropertyChanged();
- }
- }
- }
-
- private bool _isIAMPaused;
- public bool IsIAMPaused
- {
- get => _isIAMPaused;
- set
- {
- if (_isIAMPaused != value)
- {
- if (value != OneSignal.InAppMessages.Paused)
- {
- OneSignal.InAppMessages.Paused = value;
- }
-
- _isIAMPaused = value;
- OnPropertyChanged();
- }
- }
- }
-
- private bool _isLocationShared;
- public bool IsLocationShared
- {
- get => _isLocationShared;
- set
- {
- if (_isLocationShared != value)
- {
- if (value != OneSignal.Location.IsShared)
- {
- OneSignal.Location.IsShared = value;
- }
-
- _isLocationShared = value;
- OnPropertyChanged();
- }
- }
- }
-
- private string _liveActivityId;
- public string LiveActivityId
- {
- get => _liveActivityId;
- set
- {
- if (_liveActivityId != value)
- {
- _liveActivityId = value;
- OnPropertyChanged();
- }
- }
- }
-
- private string _liveActivityType;
- public string LiveActivityType
- {
- get => _liveActivityType;
- set
- {
- if (_liveActivityType != value)
- {
- _liveActivityType = value;
- OnPropertyChanged();
- }
- }
- }
-
- public ICommand GivePrivacyConsentCommand { get; }
- public ICommand RevokePrivacyConsentCommand { get; }
- public ICommand LoginUserCommand { get; }
- public ICommand LogoutUserCommand { get; }
- public ICommand TrackEventCommand { get; }
- public ICommand AddAliasCommand { get; }
- public ICommand PromptForPushCommand { get; }
- public ICommand AddEmailCommand { get; }
- public ICommand AddSMSCommand { get; }
- public ICommand AddTagCommand { get; }
- public ICommand AddOutcomeCommand { get; }
- public ICommand AddTriggerCommand { get; }
- public ICommand PromptForLocationCommand { get; }
- public ICommand StartDefaultLiveActivityCommand { get; }
- public ICommand EnterLiveActivityCommand { get; }
- public ICommand ExitLiveActivityCommand { get; }
- public ICommand SetPushToStartLiveActivityCommand { get; }
- public ICommand RemovePushToStartLiveActivityCommand { get; }
- public ICommand ValidationCommand { get; }
-
- private Page _page;
-
- public MainPageModel(Page page)
- {
- _page = page;
-
- GivePrivacyConsentCommand = new Command(GivePrivacyConsent);
- RevokePrivacyConsentCommand = new Command(RevokePrivacyConsent);
- LoginUserCommand = new Command(LoginUser);
- LogoutUserCommand = new Command(LogoutUser);
- TrackEventCommand = new Command(TrackEvent);
- AddAliasCommand = new Command(AddAlias);
- PromptForPushCommand = new Command(PromptForPush);
- AddEmailCommand = new Command(AddEmail);
- AddSMSCommand = new Command(AddSMS);
- AddTagCommand = new Command(AddTag);
- AddOutcomeCommand = new Command(AddOutcome);
- AddTriggerCommand = new Command(AddTrigger);
- PromptForLocationCommand = new Command(PromptForLocation);
- StartDefaultLiveActivityCommand = new Command(StartDefaultLiveActivity);
- EnterLiveActivityCommand = new Command(EnterLiveActivity);
- ExitLiveActivityCommand = new Command(ExitLiveActivity);
- SetPushToStartLiveActivityCommand = new Command(SetPushToStartLiveActivity);
- RemovePushToStartLiveActivityCommand = new Command(RemovePushToStartLiveActivity);
-
- ValidationCommand = new Command(Validation);
-
- // Initialize OneSignal SDK.
- OneSignal.Debug.LogLevel = LogLevel.VERBOSE;
- OneSignal.Debug.AlertLevel = LogLevel.NONE;
-
- OneSignal.ConsentRequired = true;
- OneSignal.ConsentGiven = false;
-
- OneSignal.Initialize(_appId);
-
- OneSignal.LiveActivities.SetupDefault();
-
- OneSignal.User.Changed += User_Changed;
- OneSignal.User.PushSubscription.Changed += PushSubscription_Changed;
- OneSignal.Notifications.PermissionChanged += Notifications_PermissionChanged;
- OneSignal.Notifications.Clicked += Notifications_Clicked;
- OneSignal.Notifications.WillDisplay += Notifications_WillDisplay;
-
- OneSignal.InAppMessages.WillDisplay += InAppMessages_WillDisplay;
- OneSignal.InAppMessages.DidDisplay += InAppMessages_DidDisplay;
- OneSignal.InAppMessages.WillDismiss += InAppMessages_WillDismiss;
- OneSignal.InAppMessages.DidDismiss += InAppMessages_DidDismiss;
- OneSignal.InAppMessages.Clicked += InAppMessages_Clicked;
-
- IsPushEnabled = OneSignal.User.PushSubscription.OptedIn;
- HasPushPermission = OneSignal.Notifications.Permission;
- IsIAMPaused = OneSignal.InAppMessages.Paused;
- IsLocationShared = OneSignal.Location.IsShared;
- PushSubscriptionId = OneSignal.User.PushSubscription.Id;
- }
-
- private void User_Changed(object sender, OneSignalSDK.DotNet.Core.User.UserStateChangedEventArgs e)
- {
- var user = e.State.Current;
- Debug.WriteLine($"User has changed: OneSignalId=${user.OneSignalId}, ExternalId={user.ExternalId}");
- }
-
- private void InAppMessages_Clicked(object sender, OneSignalSDK.DotNet.Core.InAppMessages.InAppMessageClickedEventArgs e)
- {
- Debug.WriteLine($"IAM clicked: ${e.Result.ActionId}.");
- }
-
- private void InAppMessages_WillDisplay(object sender, OneSignalSDK.DotNet.Core.InAppMessages.InAppMessageWillDisplayEventArgs e)
- {
- Debug.WriteLine($"IAM ${e.Message.MessageId} will display.");
- }
-
- private void InAppMessages_DidDisplay(object sender, OneSignalSDK.DotNet.Core.InAppMessages.InAppMessageDidDisplayEventArgs e)
- {
- Debug.WriteLine($"IAM ${e.Message.MessageId} did display.");
- }
-
- private void InAppMessages_WillDismiss(object sender, OneSignalSDK.DotNet.Core.InAppMessages.InAppMessageWillDismissEventArgs e)
- {
- Debug.WriteLine($"IAM ${e.Message.MessageId} will dismiss.");
- }
-
- private void InAppMessages_DidDismiss(object sender, OneSignalSDK.DotNet.Core.InAppMessages.InAppMessageDidDismissEventArgs e)
- {
- Debug.WriteLine($"IAM ${e.Message.MessageId} did dismiss.");
- }
-
- private void Notifications_WillDisplay(object sender, OneSignalSDK.DotNet.Core.Notifications.NotificationWillDisplayEventArgs e)
- {
- Debug.WriteLine($"Notification ${e.Notification.NotificationId} will display.");
- e.PreventDefault();
- e.Notification.display();
- }
-
- private void Notifications_Clicked(object sender, OneSignalSDK.DotNet.Core.Notifications.NotificationClickedEventArgs e)
- {
- Debug.WriteLine($"Notification ${e.Notification.NotificationId} has been clicked");
- }
-
- private void Notifications_PermissionChanged(object sender, OneSignalSDK.DotNet.Core.Notifications.NotificationPermissionChangedEventArgs e)
- {
- Debug.WriteLine($"Notification Permissions has changed: ${e.Permission}");
- HasPushPermission = e.Permission;
- }
-
- private void PushSubscription_Changed(object sender, OneSignalSDK.DotNet.Core.User.Subscriptions.PushSubscriptionChangedEventArgs e)
- {
- var pushSubscription = e.State.Current as IPushSubscriptionState;
- Debug.WriteLine($"Push Subscription has changed: Id=${pushSubscription.Id}, Token={pushSubscription.Token}, OptedIn=${pushSubscription.OptedIn}");
- IsPushEnabled = OneSignal.User.PushSubscription.OptedIn;
- PushSubscriptionId = e.State.Current.Id;
- }
-
- private void GivePrivacyConsent()
- {
- OneSignalSDK.DotNet.OneSignal.ConsentGiven = true;
- HasGivenPrivacyConsent = true;
- }
-
- private void RevokePrivacyConsent()
- {
- OneSignalSDK.DotNet.OneSignal.ConsentGiven = false;
- HasGivenPrivacyConsent = false;
- }
-
- private async void LoginUser()
- {
- var externalId = await _page.DisplayPromptAsync("Login User", "External ID of User", "Login");
-
- if(String.IsNullOrWhiteSpace(externalId))
- {
- return;
- }
-
- OneSignal.Login(externalId);
- }
-
- private void LogoutUser()
- {
- OneSignal.Logout();
- }
-
- private void TrackEvent()
- {
- string platform = DeviceInfo.Platform == DevicePlatform.Android ? "android" : "ios";
-
- Debug.WriteLine($"Tracking event: DotNet-{platform}-noprops");
- OneSignal.User.TrackEvent($"DotNet-{platform}-noprops");
-
- Debug.WriteLine($"Tracking event: DotNet-{platform} with properties");
- OneSignal.User.TrackEvent($"DotNet-{platform}", new Dictionary
- {
- { "someNum", 123 },
- { "someFloat", 3.14159 },
- { "someString", "abc" },
- { "someBool", true },
- { "someObject", new Dictionary
- {
- { "abc", "123" },
- { "nested", new Dictionary { { "def", "456" } } },
- { "ghi", null }
- }
- },
- { "someArray", new List