O'Reilly logo

Expert Delphi by Paweł Głowacki

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

The life of an app

An app is not a lonely island. It is always executed by the operating system, within bounds that it imposes. Depending on the type of the app, we could be interested in responding to different application lifecycle events that the operating system sends to it. Every operating system has a slightly different app lifecycle model, but in the case of mobile the most tricky part could be properly handling the situation when our apps move from foreground execution to background, and back.

FireMonkey provides common abstraction for handling an application lifecycle through different types of application events defined in the FMX.Platform unit:

type  TApplicationEvent = (FinishedLaunching, BecameActive, WillBecomeInactive, EnteredBackground, ...

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