light app in sketchware
Flashlight app in sketchware pro is the most searched and most asked project in sketchware pro community but sketchware pro do not provide functionality turn on and turn off flashlight. Flashlight app in sketchware In this post I'll tell two method to turn on and turn off flashlight programmatically using codes in sketchware pro. Turn on flashlight in sketchware To turn on flashlight copy and paste this code in add source directly of sketchware pro. android.hardware.camera2.CameraManager cameraManager = (android.hardware.camera2.CameraManager) getSystemService(Context.CAMERA_SERVICE); try { String cameraId = cameraManager.getCameraIdList()[0]; cameraManager.setTorchMode(cameraId, true); } catch (android.hardware.camera2.CameraAccessException e) { } You can use this code in onclick event. Turn off flashlight in sketchware pro To turn off flashlight there is another code, copy and paste this code in sketchware pro. Use this code in add source directly of sketchware pro. android.ha