Daniel Fernandes
Android Enthusiast
So, I'm making a flashlight app. I want to add a feature to change brightness of the camera flash. To do that I want it to rapidly turn the flash on and off. I want something like this:
So, what function should I use for making my app wait. In Arduino, I used to use "delay(10);" where 10 means it has to wait for 10 milliseconds. I want something like this for Android.
while (this happens){
turn flash on;
wait for (some time);
turn flash off;
wait for (some different time);
}
turn flash on;
wait for (some time);
turn flash off;
wait for (some different time);
}
So, what function should I use for making my app wait. In Arduino, I used to use "delay(10);" where 10 means it has to wait for 10 milliseconds. I want something like this for Android.