unit uPlatformService; interface uses FMX.Platform; type TPlatformService = record class function Available(out Service: IntfType): Boolean; static; class function Get: IntfType; static; end; implementation uses System.TypInfo; class function TPlatformService.Available(out Service: IntfType): Boolean; var Guid: TGUID; begin Guid := PTypeInfo(TypeInfo(IntfType)).TypeData.Guid; Result := TPlatformServices.Current.SupportsPlatformService(Guid, IInterface(Service)); end; class function TPlatformService.Get: IntfType; var Guid: TGUID; begin Guid := PTypeInfo(TypeInfo(IntfType)).TypeData.Guid; Result := IntfType(TPlatformServices.Current.GetPlatformService(Guid)); end; end.