FMX: How to detect an Android shutdown event

Hello, I'm looking for a component or an API to detect when the Android OS is going to shutdown, and implement some action (event) to save some data from the app. Do you have something like that?
Thank you

This works for me:

uses FMX.Platform;

procedure TMyForm.FormCreate(Sender: TObject);
var
AppEventSvc:IFMXApplicationEventService;
begin
if TPlatformServices.Current.SupportsPlatformService(IFMXApplicationEventService,IInterface(AppEventSvc)) then
begin
AppEventSvc.SetApplicationEventHandler(AppEvent);
end;
end;

function TMyForm.AppEvent(AAppEvent:TApplicationEvent;AContext:TObject):Boolean;
begin
if AAppEvent=TApplicationEvent.WillTerminate then
begin
// Do soomething
end;
Result:=True;
end;

It worked pretty good. Just what I needed. Thank you so much.