Created
September 17, 2018 01:32
-
-
Save codercampos/b4ff415b4e5dc1aaa89441e59ee696c4 to your computer and use it in GitHub Desktop.
Xam.Plugin.Notifier implementation on Xamarin Forms - Xamarin Latino
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:LocalNotifications" x:Class="LocalNotifications.MainPage"> | |
<StackLayout> | |
<!-- Place new controls here --> | |
<Button x:Name="btnNotification" Text="Send Notification in 5 seconds" HorizontalOptions="Center" VerticalOptions="CenterAndExpand" /> | |
</StackLayout> | |
</ContentPage> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Xamarin.Forms; | |
using Plugin.LocalNotifications; | |
namespace LocalNotifications | |
{ | |
public partial class MainPage : ContentPage | |
{ | |
public MainPage() | |
{ | |
InitializeComponent(); | |
btnNotification.Clicked += BtnNotification_Clicked; | |
} | |
void BtnNotification_Clicked(object sender, EventArgs e) | |
{ | |
CrossLocalNotifications.Current.Show("Xamarin Latino", "Hello, this is a local notification from Xamarin Forms", 0, DateTime.Now.AddSeconds(7)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment