Using flashlight with barcode scanner not working properly

715 views
Skip to first unread message
Assigned to taifu...@gmail.com by steve....@gmail.com

Patrick Passarella

unread,
May 16, 2017, 9:11:39 AM5/16/17
to MIT App Inventor Forum
I did a barcode/QRcode scanner, all working fine, including vibrate and a random beep sound with it, but i NEED to have flashlight with the scanner, im using a extension for flashlight, but the flashlight turns off when the scan camera opens, even with a turn on and off light button, i tried to use other apps too, more recent ones made by "app inventor" that already has flashlight blocks, but same problem, is there anything i can do?

SteveJG

unread,
May 16, 2017, 9:28:22 AM5/16/17
to MIT App Inventor Forum
It is probably impossible to have the scan camera AND flashlight work simultaneously.   App Inventor apps work asynchronously. and might make simultaneous operation impossible.  Your hardware might not allow the flashlight to work under certain conditions.

You did not post a block image, so does anyone really want to speculate without seeing exactly what you are attempting?

I expect it is simply impossible to use both the flashlight and camera/scanner on any device simultaneously as they might share similar hardware.

Patrick Passarella

unread,
May 16, 2017, 9:37:15 AM5/16/17
to mitappinv...@googlegroups.com
You only need to know the flashlight block, and it's only a single block, a button when click > turn flashlight on, only that, my blocks are correct, i need a answer for the problem it might be, like you said that it might use the same hardware, it's possible to use camera + flashlight, but i guess not on APP inventor, because there is no option to put permissions or something like that, i have the same project all done with Java in Android Studio, but it''s even more complicated, so im trying with App inventor to be more fast and easy for me and my client. Thanks for the answer

Taifun

unread,
May 16, 2017, 10:17:52 AM5/16/17
to mitappinv...@googlegroups.com
 im using a extension for flashlight, but the flashlight turns off when the scan camera opens
the scanner turns the flashlight off while starting the scan, there is not much we can do
you might want to try another external scanner app...

 i have the same project all done with Java in Android Studio
my guess is, you will have to continue with your project in Android Studio then

Taifun

Taifun

unread,
May 16, 2017, 10:20:31 AM5/16/17
to MIT App Inventor Forum
alternatively you could write your own scanner extension, which enables the flashlight while scanning ...

more information about how to create an extension see the App Inventor Extensions document
however that will be more advanced and will require some Java skills...

Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 

Reply all
Reply to author
Forward
0 new messages