Skip to content

Commit 7c4a763

Browse files
committed
Merge branch 'do-not-cache-settings' of https://github.com/notifo-io/sdk-xamarin into do-not-cache-settings
2 parents 365269d + e63e1b2 commit 7c4a763

File tree

4 files changed

+29
-13
lines changed

4 files changed

+29
-13
lines changed

sample/Sample/App.xaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,12 @@
44
xmlns="http://xamarin.com/schemas/2014/forms"
55
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
66
xmlns:prism="http://prismlibrary.com">
7-
<Application.Resources />
7+
8+
<Application.Resources >
9+
<ResourceDictionary>
10+
<Style TargetType="Label">
11+
<Setter Property="TextColor" Value="Magenta" />
12+
</Style>
13+
</ResourceDictionary>
14+
</Application.Resources>
815
</prism:PrismApplication>

sample/Sample/NotifoStartup.cs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ==========================================================================
1+
// ==========================================================================
22
// Notifo.io
33
// ==========================================================================
44
// Copyright (c) Sebastian Stehle
@@ -19,17 +19,24 @@ public static INotifoMobilePush UseDefaults(this INotifoMobilePush notifo)
1919
notifo
2020
.SetSharedName("group.io.notifo.xamarin.sample")
2121
.SetBaseUrl(Constants.ApiUrl)
22+
.SetApiVersion(ApiVersion.Version_1_5)
2223
.UseFirebasePluginEventsProvider();
2324

2425
notifo.OnNotificationOpened += Current_OnNotificationOpened;
25-
notifo.OnLog += JustLog;
26+
notifo.OnNotificationReceived += Notifo_OnNotificationReceived;
27+
notifo.OnLog += Notifo_OnLog;
2628

2729
return notifo;
2830
}
2931

30-
private static void JustLog(object source, NotificationLogEventArgs e)
32+
private static void Notifo_OnLog(object sender, NotificationLogEventArgs e)
33+
{
34+
System.Diagnostics.Debug.WriteLine("Notification log message: " + e.Message);
35+
}
36+
37+
private static void Notifo_OnNotificationReceived(object sender, NotificationEventArgs e)
3138
{
32-
Console.WriteLine($"DEBUG: Log {e.Message} Message Args: {e.MessageArgs}", e.Message, e.MessageArgs);
39+
System.Diagnostics.Debug.WriteLine("Notification received: " + e.Notification.Subject);
3340
}
3441

3542
private static void Current_OnNotificationOpened(object source, NotificationEventArgs e)

sample/Sample/Views/EventsPage.xaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
xmlns="http://xamarin.com/schemas/2014/forms"
55
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
66
xmlns:prism="http://prismlibrary.com"
7+
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
8+
ios:Page.UseSafeArea="True"
79
prism:ViewModelLocator.AutowireViewModel="True"
810
BackgroundColor="White"
911
Title="Events">
@@ -19,17 +21,15 @@
1921
Margin="8,0"
2022
FontAttributes="Bold"
2123
FontSize="18"
22-
Text="{Binding Subject}"
23-
TextColor="Black" />
24-
24+
Text="{Binding Subject}"/>
25+
2526
<Label
2627
Margin="8,0"
2728
FontAttributes="None"
2829
FontSize="14"
29-
Text="{Binding Body}"
30-
TextColor="Black" />
31-
32-
<Label
30+
Text="{Binding Body}"/>
31+
32+
<Label
3333
Margin="8,0"
3434
FontAttributes="None"
3535
FontSize="14"

sample/Sample/Views/LoginPage.xaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
66
xmlns:prism="http://prismlibrary.com"
77
prism:ViewModelLocator.AutowireViewModel="True"
8+
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
9+
ios:Page.UseSafeArea="True"
810
Title="Login">
911

1012
<ContentPage.Content>
@@ -21,7 +23,7 @@
2123
Text="Enter API Key"
2224
HorizontalOptions="CenterAndExpand" />
2325

24-
<Entry Text="{Binding ApiKey, Mode=TwoWay}" />
26+
<Editor Text="{Binding ApiKey, Mode=TwoWay}" TextColor="Magenta" BackgroundColor="WhiteSmoke" />
2527

2628
<Button Command="{Binding LoginCommand}" Text="Login" />
2729
</StackLayout>

0 commit comments

Comments
 (0)