FMX. Platform.tapplicationevent
Http://docwiki.embarcadero.com/Libraries/XE8/en/FMX.Platform.TApplicationEvent
(finishedlaunching, becameactive, willbecomeinactive, Enteredbackground, Willbecomeforeground, Willterminate,lowmemory, Timechange, OpenURL);
An instance of Tapplicationevent is any of the following values:
| Item |
Description |
Platform |
| Android |
IOS |
|
BecameActive
|
Your application has gained the focus. |
Supported |
Supported |
|
EnteredBackground
|
The user is no longer using your application and your application is still running in the background. |
Supported |
Supported |
|
FinishedLaunching
|
Your application has been launched. |
Supported |
Supported |
|
lowmemory
|
This warns your application so the device is running O UT of memory.
Your application should reduce memory usage, freeing structures and data that can is loaded again at a later point. |
Supported |
Supported |
|
OpenURL
|
You application have received a request to open an URL.
Application Events of this type is usually associated with a context. This context is an instance of the Ios-only Tiosopenapplicationcontext class, which provides the following re Ad-only properties:
Tiosopenapplicationcontext.sourceapp is a string that contains the Bund Le ID of the application that requested your application to open the URL.
Tiosopenapplicationcontext.url is the URL to open, either a network resource or a file.
tiosopenapplicationcontext.context is a pointer to a Property-list object that might provide additional I nformation.
See the IOS API reference documentation for more information. |
|
Supported |
|
TimeChange
|
There has been a significant.
This event might happen for example when the day changes or when the device is changes to or from daylight savings time. |
|
Supported |
|
WillBecomeForeground
|
The user is now using your application, which were previously in the background. |
Supported |
Supported |
|
WillBecomeInactive
|
Your application is going to loose the focus. |
Supported |
Supported |
|
WillTerminate
|
The user is quitting your application. |
Supported |
Supported |
http://codeverge.com/embarcadero.delphi.ios/ifmxapplicationeventservice-not-firing/ 2028062
http://codeverge.com/embarcadero.delphi.firemonkey/keep-application-on-top/2009583
Procedure Tmainform.formcreate (Sender:tobject); var Svcevents:ifmxapplicationeventservice; Begin if TPlatformServices.Current.SupportsPlatformService (Ifmxapplicationeventservice, IInterface (svcevents)) Then Svcevents.setapplicationeventhandler (handleappevent); Application.onexception: = Exceptionhandler; End function Tmainform.handleappevent (aappevent:tapplicationevent; Acontext:tobject): Boolean; Begin case Aappevent of tapplicationevent.finishedlaunching:; Tapplicationevent.becameactive:; Tapplicationevent.willbecomeinactive:; Tapplicationevent.enteredbackground:; Tapplicationevent.willbecomeforeground:; Tapplicationevent.willterminate:; Tapplicationevent.lowmemory:; Tapplicationevent.timechange:; Tapplicationevent.openurl:; End Result: = True; End -See more at:http://codeverge.com/embarcadero.delphi.firemonkey/keep-application-on-top/2009583# Sthash.6xm5jeui.dpufprocedure tmainform.formcreate (Sender:tobject); var Svcevents:ifmxapplicationeventservice; Begin IF TPlAtformServices.Current.SupportsPlatformService (Ifmxapplicationeventservice, IInterface (svcevents)) Then Svcevents.setapplicationeventhandler (handleappevent); Application.onexception: = Exceptionhandler; End function Tmainform.handleappevent (aappevent:tapplicationevent; Acontext:tobject): Boolean; Begin case Aappevent of tapplicationevent.finishedlaunching:; Tapplicationevent.becameactive:; Tapplicationevent.willbecomeinactive:; Tapplicationevent.enteredbackground:; Tapplicationevent.willbecomeforeground:; Tapplicationevent.willterminate:; Tapplicationevent.lowmemory:; Tapplicationevent.timechange:; Tapplicationevent.openurl:; End Result: = True; End -See more At:http://codeverge.com/embarcadero.delphi.firemonkey/keep-application-on-top/2009583#sthash.6xm5jeui.dpuf
Procedure Tmainform.formcreate (Sender:tobject); var Svcevents:ifmxapplicationeventservice; Begin if TPlatformServices.Current.SupportsPlatformService (Ifmxapplicationeventservice, IInterface (svcevents)) Then Svcevents.setapplicationeventhandler (handleappevent); Application.onexception: = Exceptionhandler; End function Tmainform.handleappevent (aappevent:tapplicationevent; Acontext:tobject): Boolean; Begin case Aappevent of tapplicationevent.finishedlaunching:; Tapplicationevent.becameactive:; Tapplicationevent.willbecomeinactive:; Tapplicationevent.enteredbackground:; Tapplicationevent.willbecomeforeground:; Tapplicationevent.willterminate:; Tapplicationevent.lowmemory:; Tapplicationevent.timechange:; Tapplicationevent.openurl:; End Result: = True; End -See more At:http://codeverge.com/embarcadero.delphi.firemonkey/keep-application-on-top/2009583#sthash.6xm5jeui.dpuf
http://codeverge.com/embarcadero.delphi.firemonkey/keep-application-on-top/2009583
proceduretmainform.formcreate (Sender:tobject); varSvcevents:ifmxapplicationeventservice;begin ifTPlatformServices.Current.SupportsPlatformService (Ifmxapplicationeventservice, IInterface (svcevents))
ThenSvcevents.setapplicationeventhandler (handleappevent); Application.onexception:=Exceptionhandler;End;functiontmainform.handleappevent (aappevent:tapplicationevent; Acontext:tobject): Boolean;begin CaseAappevent oftapplicationevent.finishedlaunching:; Tapplicationevent.becameactive:; Tapplicationevent.willbecomeinactive:; Tapplicationevent.enteredbackground:; Tapplicationevent.willbecomeforeground:; Tapplicationevent.willterminate:; Tapplicationevent.lowmemory:; Tapplicationevent.timechange:; Tapplicationevent.openurl:; End; Result:=True;End;//See more at:http://codeverge.com/embarcadero.delphi.firemonkey/keep-application-on-top/2009583
Procedure Tmainform.formcreate (Sender:tobject); var Svcevents:ifmxapplicationeventservice; Begin if TPlatformServices.Current.SupportsPlatformService (Ifmxapplicationeventservice, IInterface (svcevents)) Then Svcevents.setapplicationeventhandler (handleappevent); Application.onexception: = Exceptionhandler; End function Tmainform.handleappevent (aappevent:tapplicationevent; Acontext:tobject): Boolean; Begin case Aappevent of tapplicationevent.finishedlaunching:; Tapplicationevent.becameactive:; Tapplicationevent.willbecomeinactive:; Tapplicationevent.enteredbackground:; Tapplicationevent.willbecomeforeground:; Tapplicationevent.willterminate:; Tapplicationevent.lowmemory:; Tapplicationevent.timechange:; Tapplicationevent.openurl:; End Result: = True; End -See more At:http://codeverge.com/embarcadero.delphi.firemonkey/keep-application-on-top/2009583#sthash.6xm5jeui.dpuf
FMX. Platform.tapplicationevent