App to Turn On Flashlight (No Extensions)

Hello! This is my first post, so apologies if it is not in the right place.

I have been searching on internet a lot of tutorials (both videos and posts on this community) about how to create an app to turn on flashlight, and everyone refers to Taifun's app inventor extension.

That's nice, however, I am wondering how difficult is to turn on the flashlight without opening the camera: just a button (or two), when clicked turn on flashlight, and then turn off. What components should we consider and how to use the blocks? Maybe using an if statement to validate whether the flashlight is turned on, and if so then turn it off, else turn it on.

But I can't find the native way to work with the flashlight without using extensions.

Thank you!

That's correct, you will need an extension
Taifun
PS: why would someone create an extension if there is another way?

I mentioned the app should run without extensions.

The question should be: why not? I mean, I think I am not asking about building a complicated app. And native blocks are there: I support the idea of building apps and understand what's under the rug, no need to add an extension for that. I also teach at school, so it would be nice to have the blocks

I understand your concern but to execute certain functions, a specific code is required that will run the function and give the output.

An extension is nothing but extra lines of code that will run the function to get the required output which is not available/possible with existing inbuilt AI2 components.

And inbuilt AI2 components are also a type of individual extension itself only difference is that they are developed by AI2 team and extensions are developed by individual developers.

Its your choice to use which extension and by whom it was developed.

Check your phone settings for taps / gestures options.

I have my phone setup to double tap the back of the phone to turn the torch on and off.

No need for an app.

I’m making a trolling app that needs flashlight, and I want to post it into the gallery, plz help?

Maybe the activity starter?

See above

For a front facing lazy flashlight, I would try a full screen white Label with white text.

Guaranteed to work cross platform too.

Make it a button for on off action.

Or a blinking arrangement

Or an image component with a choice of pictures

Polar bear in a snow storm

Black cat in a coal mine at night