B4A Class Torch class

DavideV

Active Member
Licensed User
Hello,
this is a simple B4A class to make easy the use of the built-in led of our beloved android devices.
Tested on various devices up to android 8.
The goal is to use the led as a Torch.

The code is commented and comes with an example.

It uses inline java and depends on:
-Javaobject lib
-Phone lib

Cheers!
Davide
 

Attachments

Pitag

Member
Licensed User
Hi DavideV

the example works like expected!

as TargetSDKVersion is set to 21, who wants to use this code for SDK > 22 will have to deal with RuntimePermission. I can confirm that the code works also with SDK > 22.

Pitag.
 

DavideV

Active Member
Licensed User
Hi DavideV

the example works like expected!

as TargetSDKVersion is set to 21, who wants to use this code for SDK > 22 will have to deal with RuntimePermission. I can confirm that the code works also with SDK > 22.

Pitag.
Yes, you are right. I kept things simple for the example, but of course you must deal with camera permissions.
 

hatzisn

Well-Known Member
Licensed User
Hi David, complimenti, nice job. I have seen your video about Interactive Maps in YouTube. Which program do you use for screen capturing? I 've noticed that it also captures the point where you touch the screen... I use AirDroid for screen capturing but it does not capture the point where you touch the screen. Would it be possible to tell me the name of the program you use? Thanks in advance...
 

DavideV

Active Member
Licensed User
Hi David, complimenti, nice job. I have seen your video about Interactive Maps in YouTube. Which program do you use for screen capturing? I 've noticed that it also captures the point where you touch the screen... I use AirDroid for screen capturing but it does not capture the point where you touch the screen. Would it be possible to tell me the name of the program you use? Thanks in advance...
Hello hatzisn, it's a bit O.T., anyway about the touches look at the attached images:
devOptions.png
Then I recorded the phone screen using the Built-in feature of B4A, under Tools->Videocapture
 

hatzisn

Well-Known Member
Licensed User
Thank you David. I have seen this before in Android apps recording videos and have asked the same question multiple times (in YouTube of course). Yet no one until now has answered. Thank you very much for your response and for the analytical presentation you have provided.
 
Top