Show/Hide Toolbars

Android Applications

One of the major advantages of Delphi is the ability to run and debug application logic on a desktop development computer and only use the slower more cumbersome development environment on an actual device to deal with device specific issues. Unfortunately the desktops tend not to have motion sensors or location sensors.

 

If this module if compiled for MS Windows Dummy Sensors are included which generate predictable actions and values.

 

The RefreshSensors procedure of these Sensor Objects will insert one of these Dummy Sensors into the Sensor Array if no actual sensors are detected.

 

{$IFDEF msWindows}

 if Length(FSensors) < 1 then

   case ThisCategory of

     TSensorCategory.Location:

       Begin

         SetLength(FSensors, 1);

         FSensors[0] := TDummyWindowsLocationSensor.Create(nil);

       End;

     TSensorCategory.Motion:

       Begin

         SetLength(FSensors, 1);

         FSensors[0] := TDummyWindowsMotionSensor.Create(nil);

       End;

   end;

{$ENDIF}