O'Reilly logo

Delphi Cookbook - Second Edition by Daniele Teti

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tracking the application's lifecycle

In the "safe" MS Windows desktop application development land, our application has a lifecycle, but it is not crucial to take care of it. Usually, you have a set of events to handle such as FormCreate, FormClose (at the form level), or Application OnRestore, or Application OnTerminate. In some cases, you have to handle the state where the main application window is minimized, and this is still simple. In the mobile world, as usual, things are a bit more complex. The concept of lifecycle is evidence. Just to make things messier, an Android activity's lifecycle is different from an iOS view lifecycle. Remember, when an app is in the background, it can be completely destroyed.

Getting ready

But, hey! Why I should ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required