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 :=…
Read more
available on Play Store at this link
{$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 +…
Read more
This is a simple example for usign Nevrona Indy components in Delphi to create a small server application using TCP/IP protocol. TO simplify we can build an example where there is a Server Application that recive a string from a Client App. and then return that string to the Client , but we use streams…
Read more