Flash Light Source Code Demo In Delphi XE5 Firemonkey On Android

Delphi XE6 Firemonkey Android FlashlightDeveloper Lin Shou Shan (superlevin) from Taiwan has a simple demo project on using the Android flashlight feature in Delphi XE5 Firemonkey. The demo is up on Github and is really on a few lines of code. There are a few different ways people have figured out how to turn their phones into a flashlight and this demo makes use of the flash (also known as torch) functionality of the Android device. The TCameraComponent that ships with Delphi XE5 has a property called HasFlash which tells you whether the torch device is available. If it is available you can use code like this to turn on the flash: CameraComponent1.TorchMode := TTorchMode.tmModeOn;. This code should probably also work in Delphi XE6 and AppMethod. I believe you also need to add the Android permission: android.permission.FLASHLIGHT. You can also check out a question and answer pair on StackOverflow to see the actual Java code that does flashlight code.

Head over and download the full source code for the Android flash light demo for Delphi XE5 Firemonkey.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Flash Light Source Code Demo In Delphi XE5 Firemonkey On Android by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Delphi XE6 Firemonkey Windows TrayIcon
Free Tray Icon Component In Delphi XE6 Firemonkey On Windows

Over on a Russian Firemonkey site there is a Windows tray icon component for Delphi XE6 Firemonkey. The tray icon...

Close