I trying to turn ON the phone flash light every second. I have been searching but nothing found useful.
This is the code that I am using:
Thread t = new Thread() {
@Override
public void run() {
seconds = 0;
try {
while (seconds<11) {
Thread.sleep(1000);
runOnUiThread(new Runnable() {
@Override
public void run() {
// Put code here!
seconds++;
}
});
}
} catch (InterruptedException e) {
}
}
};
t.start();
I will really appreciate your help! Thanks.