Catching MainActivity Events in App.xaml.cs

3

I have this in my App.xaml.cs

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

When I receive messages, that is, have something on pdata, how do I fire on my badge's MainActivity?

In the OnCreate of Activity I have

badge = new Badge();

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

Contador++;
badge.count(Contador);

I can not get anything in the App from the MainActivity or the other way around, even adding the appropriate references.

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

    
asked by anonymous 02.11.2017 / 01:20

0 answers