How to turn on the Flash light led?

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am

How to turn on the Flash light led?

Post by sphere » Thu Jul 16, 2015 11:43 am

Hello,
does anyone know how to turn on the flash light LED without using the camera itself?
Is this possible from within LiveCode?

Thanks a lot !

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: How to turn on the Flash light led?

Post by MaxV » Thu Jul 16, 2015 2:31 pm

First of all not all device can switch on/off their light, see FLASH_MODE_TORCH of Android API.
However at the present I don't think you can turn on flash light with livecode.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am

Re: How to turn on the Flash light led?

Post by sphere » Thu Jul 16, 2015 6:07 pm

Well would'nt it be time that livecode supported it?
It seem already been asked in 2013 see http://forums.livecode.com/viewtopic.php?t=17795

You can access the camera but not the flashlight, nowadays many many people have phones with flashlight.
And if it's not available then maybe that is detectable.
It seems to be supported it Android since Android API 5 if i'm not mistaking.

Or maybe it's possible to use a piece of java in livecode as an external (after all the apk is java?) http://stackoverflow.com/questions/3878 ... ndroid-2-1

thanks

kurt
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 21
Joined: Sat Apr 08, 2006 8:30 pm
Contact:

Re: How to turn on the Flash light led?

Post by kurt » Fri Jul 17, 2015 2:37 am

While I would be thrilled if LC did support varied phone-specific functions, I get the impression that the company is first trying to provide a subset of functions which are applicable to both desktop and phone operating systems. To that end, I suppose the inclusion of the ability to run HTML5 functions in a browser cross-platform is high on its list.
FWIW, even a widely-used Android-specific tool such as Tasker does not allow for the control of the LED without a third-party plugin. If end-users would like that control, they have to download the plugin as well. -An inconvenience if the plugin is free, a real encumbrance if it is not!

Post Reply