M
M
Maxim Aron2016-12-05 16:22:26
Android
Maxim Aron, 2016-12-05 16:22:26

How to blink an LED (flashlight) in android?

I need to write an application that could blink a flashlight 20 - 30 times per second. But how can I do it? It is possible to write in the handler that when the button is pressed, the LED will turn on and off many times, but how can this be done in one second?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rou1997, 2016-12-05
@Smiled

Strictly speaking, this is not a flashlight, but a camera flash, all this is in the API android.hardware.Cameraand it seems to be there, it worked for me, but for speed you need to do it right, here is the code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question