B4A Class Torch class

Discussion in 'Additional libraries, classes and official updates' started by DavideV, Dec 26, 2018.

  1. DavideV

    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
     

    Attached Files:

    Andris, Levit, AnandGupta and 8 others like this.
  2. Pitag

    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 likes this.
  3. DavideV

    DavideV Active Member Licensed User

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

    hatzisn 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...
     
  5. DavideV

    DavideV Active Member Licensed User

    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
     
    AnandGupta and hatzisn like this.
  6. hatzisn

    hatzisn Active 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.
     
  7. DonManfred

    DonManfred Expert Licensed User

  8. hatzisn

    hatzisn Active Member Licensed User

    :)

    Actually DonManfred If I knew it existed as a built in feature in Android I wouldn't ask "which software do you use". It is clear that I was missing this piece of info...
     
  9. antsnel

    antsnel Member Licensed User

    the google AI is clearly not perfect - we still sometimes need fellow humans to tell us what to ask for :)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice