Obiettivi: integrare le push notification Firebase (FCM) in una app realizzata con Delphi per iOS senza l’ausilio di librerie di terze parti. Avere lo stesso base code nella applicazione e nei server per la gestione delle push in Delphi uguale a quello utilizzato per Android. Ambiente di test utilizzato: VM Delphi 11 Alexandria Ent.…
Leggi tutto
To detect device orientation change, you can use the following example: uses System.Messaging, FMX.Platform; var FId: Integer; // Subscribe to TOrientationChangedMessage FId := TMessageManager.DefaultManager.SubscribeToMessage(TOrientationChangedMessage, DoOrientationChanged); // Write orientation change handler: procedure TMyForm.DoOrientationChanged(const Sender: TObject; const M: TMessage); var s: IFMXScreenService; begin if TPlatformServices.Current.SupportsPlatformService(IFMXScreenService, s) then begin case s.GetScreenOrientation of TScreenOrientation.Portrait: ; TScreenOrientation.Landscape: ; TScreenOrientation.InvertedPortrait: ;…
Leggi tutto
Xtumble library for Delphi Xtumble4Delphi is native delphi library, cross platform ( Windows, Android, iOS, macOSX, Linux64) that allow you to integrate all cloud functonalitty of the XTumble platform in your application. If you create an XTumble Account you can have a dedicated ERP, e-commerce, Cluod Drive, CRM Mail with SMTP and POS system in the cluod. Creating an…
Leggi tutto
To check with Delphi / Firemonkey if the screen is in Landscape or Portrait mode i use the FMXPlatform library as in the example: uses FMXPlatform; … procedure TForm2.FormResize(Sender: TObject); var ScreenService: IFMXScreenService; begin if TPlatformServices.Current.SupportsPlatformService(IFMXScreenService, IInterface(ScreenService)) then begin if ScreenService.GetScreenOrientation in [TScreenOrientation.soPortrait, TScreenOrientation.soInvertedPortrait] then ShowMessage(‘Portrait Orientation’) else Begin ShowMessage(‘Landscape Orientation’); End; end; end;
Here is a sample code (function) to get the current language (locale) in Delphi 10Seattle. This simple procedure return the locale language for Windows, Mac and Android. function GetOSLangID: String; {$IFDEF MACOS} var Languages: NSArray; begin Languages := TNSLocale.OCClass.preferredLanguages; Result := TNSString.Wrap(Languages.objectAtIndex(0)).UTF8String; {$ENDIF} {$IFDEF ANDROID} var LocServ: IFMXLocaleService; begin if TPlatformServices.Current.SupportsPlatformService(IFMXLocaleService, IInterface(LocServ)) then Result :=…
Leggi tutto