Pick up on Mainactivity events in App.xaml.Cs

Asked

Viewed 44 times

3

I have it on my App.xaml.Cs

CrossFirebasePushNotification.Current.OnNotificationReceived += (s, p) =>
{                    
   System.Diagnostics.Debug.WriteLine("Received");
};

When I receive messages, ie have something on p.data, as I shoot at my Mainactivity badge?

In the Activity Oncreate I have

badge = new Badge();

And now I need to create a method or something to fire the badge counter, like this:

Contador++;
badge.count(Contador);

I’m not getting anything in the App from Mainactivity and not the other way around, even adding the appropriate references.

That lambda is inside the constructor class App.xaml.Cs.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.