Kiogara
Kiogara

Reputation: 657

Delphi - TCameraComponent won't find flash

I'm using Delphi 10.0 Seattle and trying to use the rear cameras's light on a Lenovo Thinkpad tablet running Windows 10 Pro. I am using TCameraComponent.

I tried using CameraComponent.TorchMode := TTorchMode.ModeOn from FMX.Media, but it raises an exception saying that the device has no torch.

Anyone know why this happens, and if there is some way to access this light/flash?

Upvotes: 1

Views: 713

Answers (1)

Remy Lebeau
Remy Lebeau

Reputation: 595369

FMX in Delphi 10.0 Seattle does not implement either Flash or Torch functionality at all on Windows. It is only implemented on OSX, iOS, and Android.

You will have to resort to using Windows-specific APIs, or even manufacturer-specific APIs, to access light/torch functionality. For example, there are FlashControl and TorchControl classes in the Windows UWP API.

Upvotes: 2

Related Questions