34 lines
894 B
C#
34 lines
894 B
C#
using RBLNews.Shared.Services;
|
|
|
|
namespace RBLNews.Maui
|
|
{
|
|
public partial class App : Application
|
|
{
|
|
private readonly AppLifecycleService _appLifecycleService;
|
|
|
|
public App(AppLifecycleService appLifecycleService)
|
|
{
|
|
_appLifecycleService = appLifecycleService;
|
|
InitializeComponent();
|
|
|
|
MainPage = new MainPage();
|
|
}
|
|
|
|
protected override Window CreateWindow(IActivationState activationState)
|
|
{
|
|
Window window = base.CreateWindow(activationState);
|
|
window.Activated += (sender, eventArgs) =>
|
|
{
|
|
_appLifecycleService.Activated();
|
|
|
|
};
|
|
window.Resumed += (sender, eventArgs) =>
|
|
{
|
|
_appLifecycleService.Resumed();
|
|
// take actions here...
|
|
};
|
|
return window;
|
|
}
|
|
}
|
|
}
|