Via Cà Matta 2 - Peschiera Borromeo (MI)
+39 02 00704272
info@synaptica.info

Categoria: Programmazione

Digital Innovation Partner

Delphi 10Seattle – Estrarre la lingua del dispositivo

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

Firebird embedded on mac-osx

Users/ivanrevelli/Downloads/Firebird.app/Contents/MacOS/firebird/ cd Users/ivanrevelli/Downloads/Firebird.app/Contents/MacOS/ Users/ivanrevelli/Downloads/Firebird.app/Contents/MacOS/firebird/libfbembed.dylib

Applicazione di gestione telecamere fatta con Firemonkey

  l’applicazione è disponibile sullo store di google all’indirizzo : https://play.google.com/store/apps/details?id=com.Digifort.MobileClient  

Delphi XE5 – Share JCalendar Event on Android

{$IFDEF ANDROID},Androidapi.JNI.GraphicsContentViewText, FMX.Helpers.Android, IdURI, Androidapi.JNI.JavaTypes, Androidapi.Jni.Net, Androidapi.JNIBridge {$ENDIF}; The Java TimeInMills is similar to UnixTime but is in Millisenconds, so to convert it : JavaTimeinMills := DateUtils.DateTimeToUnix(now) * 1000; procedure TfrmTimeDetail.btnShareClick(Sender: TObject); {$IFDEF ANDROID} var Intent: JIntent; CalendarIni: JCalendar; Uri : string; begin Uri := ‘content://com.android.calendar/events’; Intent := TJIntent.JavaClass.init(TJIntent.JavaClass.ACTION_EDIT, TJnet_Uri.JavaClass.parse(StringToJString(TIdURI.URLEncode(uri)))); //Intent.setType(StringToJString(‘vnd.android.cursor.item/event’)); intent.putExtra(StringToJString(‘beginTime’), DateTimeToUnix( (clDay.Date +…
Leggi tutto

Retrive the Imei (device identification) from your Android Device with Delphi XE5

The IMEI code is an unique number like the MAC Adrress for the lan on mobile devices… so in this example i have only putted a TButton on the form and wrote this piece of code that i found on the net: uses System.IOUtils,IdGlobalProtocols {$IFDEF ANDROID} ,FMX.Helpers.Android, Androidapi.JNI.GraphicsContentViewText, Androidapi.JNI.Net, Androidapi.JNI.JavaTypes, idUri,Androidapi.IOUtils {$ENDIF ANDROID} {$IFDEF MSWINDOWS…
Leggi tutto