public IApplication Build()
        {
            var app = new MauiApplication();

#if __IOS__
            app.PlatformLifecycleHandlers = platformLifecycleHandlers;
#elif __ANDROID__
            app.PlatformLifecycleHandlers = platformLifecycleHandlers;
#endif

            app.CommonLifecycleHandlers = commonLifecycleHandlers;

            return(app);
        }
Example #2
0
        public static void Startup <TStartup>(TStartup instance) where TStartup : IStartup
        {
            // Only run once especially with android
            if (startupRan)
            {
                return;
            }
            startupRan = true;

            var appBuilder = new MauiApplicationBuilder();

            instance.Configure(appBuilder);

            Application = (MauiApplication)appBuilder.Build();
        }
Example #3
0
 public virtual void OnResume(MauiApplication app)
 {
 }
Example #4
0
 public virtual void OnPause(MauiApplication app)
 {
 }
Example #5
0
 public virtual void OnDestroy(MauiApplication app)
 {
 }
Example #6
0
 public virtual void OnCreate(MauiApplication app)
 {
 }
Example #7
0
 public LifecycleCallbacks(MauiApplication mauiApplication)
 {
     mauiApp = mauiApplication;
 }