Xamarin.Android Architecture Components: Not getting callbacks for lifecycle events : <p>I'm trying to use the architecture components package for detecting when the application enters background or foreground state. The problem is that the callbacks are not being invoked. In the sample code below, the methods <code>onApplicationForegrounded</code> and <code>onApplicationBackgrounded</code> are not invoked:</p>

<pre><code>namespace POC.Droid
{
    [Application]
    public class MyApp : Application, ILifecycleObserver
    {
        static readonly string TAG = "MyApp";

        public MyApp(IntPtr handle, Android.Runtime.JniHandleOwnership ownerShip) : base(handle, ownerShip)
        {
        }

        public override void OnCreate()
        {
            base.OnCreate();
            ProcessLifecycleOwner.Get().Lifecycle.AddObserver(this);
        }

        [Lifecycle.Event.OnStop]
        public void onAppBackgrounded()
        {
            Log.Debug(TAG, "App entered background state.");
        }

        [Lifecycle.Event.OnStart]
        public void onAppForegrounded()
        {
            Log.Debug(TAG, "App entered foreground state.");
        }
    }
}
</code></pre>

<p>My Xamarin version is 8.2.0.16 (Visual Studio Community) and Xamarin.Android.Arch.Lifecycle.Extensions version is 1.0.0. I'm using a Nougat device (7.0) for testing.</p>
