Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidAppmethodCode SnippetDelphiDemoFiremonkey

Flash Light Source Code Demo In Delphi XE5 Firemonkey On Android

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

Delphi XE6 Firemonkey Android Flashlight | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSDeveloper 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.

Related posts
DelphiDemoFiremonkeyLinuxOSXShowcaseWindows

AutoBlogAI: FireMonkey Client To Leverage LLMs And Generative AI For Blogging

DelphiFiremonkeyShowcaseUtilityWindows

Unleashing Creativity With Song Writer AI: A Deep Dive

DelphiFiremonkeyShowcaseWindows

How To Build Stable Diffusion Text To Image Prompts

AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes

Sign up for our Newsletter and
stay informed

Leave a Reply