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

Category: Posts

Digital solution partner

Check if you have the Bluetooth Classic / LE on your android device with Delphi

By XE7 version of Delphi components are available to manage Bluetooth Classic and LE. With FireMonkey is quite simple also create a bluetooth server. Trying my applications on Raspberry PI3 where Federico mounted Marshmallow I am aware that if BT is not available on the device the app crashed. To overcome this problem I tried…
Read more

Firemonkey check screen orientation

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;

Firemonkey bitmap scaling without Aliasing on Android

With Delphi , to the Seattle version , when you scale a bitmap image to enlarge using the command “Canvas.DrawBitmap(OiginalBitmap, RectF(0, 0, OiginalBitmap.Width, OiginalBitmap.Height), RectF(0, 0, Width, Height), 1, False);” the interpolation cant be disabled. A way to eliminate the problem is to manually scale the bitmap directly creating an image pixel by pixel .…
Read more

Synaptica IOT box – Work in progress

Enjoying our meal! :-)

Firebird Sql Tips… Enable or Disable all trigger via sql

To enable and disable all triggers of a database i do two procedure : Enabling all database trigger: create procedure SP_ENABLE_ALL_TRIGGER as begin /* Procedure Text */ update RDB$TRIGGERS set RDB$TRIGGER_INACTIVE=0 where RDB$TRIGGER_NAME in( select A.RDB$TRIGGER_NAME from RDB$TRIGGERS A left join RDB$CHECK_CONSTRAINTS B ON B.RDB$TRIGGER_NAME = A.RDB$TRIGGER_NAME where ((A.RDB$SYSTEM_FLAG = 0) or (A.RDB$SYSTEM_FLAG is null))…
Read more