Ver Mensaje Individual
  #13  
Antiguo 24-07-2017
jhonalone jhonalone is offline
Miembro
 
Registrado: sep 2007
Ubicación: Madrid
Posts: 545
Reputación: 17
jhonalone Va por buen camino
Muchas gracias TOPX, por interesarte en ayudarme.

A la vista está que no soy un experto programador.
He visto el código de StackOverflow, pero no sé cómo implementarlo para conseguir evitar que se reinicen las apps al intentar ponerlas de nuevo en primer plano. No quiero parecer más burro de lo que soy pero el código referido creo que no me sirve más que para saber la situación de mi aplicación.
Código Delphi [-]
uses FMX.Types, FMX.Platform;

function TForm1.HandleAppEvent(AAppEvent: TApplicationEvent; AContext: TObject): Boolean;
begin
  case AAppEvent of
    TApplicationEvent.FinishedLaunching:    Log.d('Launched.');
    TApplicationEvent.BecameActive:         Log.d('Gained focus.');
    TApplicationEvent.EnteredBackground:    Log.d('Now running in background.');
    TApplicationEvent.WillBecomeForeground: Log.d('Restoring from background.');
    TApplicationEvent.WillBecomeInactive:   Log.d('Going to lose focus.');
    TApplicationEvent.WillTerminate:        Log.d('Quitting the application.');
    TApplicationEvent.LowMemory:            Log.d('Device running out of memory.');

    // iOS only
    TApplicationEvent.TimeChange:           Log.d('Significant change in time.');
    TApplicationEvent.OpenURL:              Log.d('Request to open an URL.');
  end;

  Result := True;
end;

procedure TForm11.FormCreate(Sender: TObject);
var
  aFMXApplicationEventService: IFMXApplicationEventService;
begin
  if TPlatformServices.Current.SupportsPlatformService(IFMXApplicationEventService,
    IInterface(aFMXApplicationEventService))
  then
    aFMXApplicationEventService.SetApplicationEventHandler(HandleAppEvent)
  else
    Log.d('Application Event Service not supported.');
end;
¿Puedes ayudarme?
Un saludo. Gracias.
__________________
"Pedid y se os dará; buscad y hallaréis ..." (Lc 11,9-10)
"...si no tengo caridad, nada soy..." (1 Cor 13,1-13)

Última edición por jhonalone fecha: 24-07-2017 a las 19:40:04.
Responder Con Cita