Skip to content

Instantly share code, notes, and snippets.

@dylanberry
Last active December 24, 2019 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dylanberry/d97fdba142e3c2c6b6089035bca8d857 to your computer and use it in GitHub Desktop.
Save dylanberry/d97fdba142e3c2c6b6089035bca8d857 to your computer and use it in GitHub Desktop.
protected override async void OnInitialized()
{
try
{
InitializeComponent();
OneSignal.Current
.StartInit(Secrets.OneSignal)
.HandleNotificationOpened(OnNotificationOpened)
.EndInit();
await NavigationService.NavigateAsync("MainPage");
}
catch (Exception ex)
{
Console.WriteLine(ex);
throw;
}
}
private void OnNotificationOpened(OSNotificationOpenedResult result)
{
//TODO: handle notification
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment