I am new in android . i implemented code for flashlight on and off while ringing call .so this code work for every device but in nexus 5 its not working .i debug and try to find out issue but nothing do (no force close, no flash on-off).
Camera.Parameters pon;
Camera cam;
pon = cam.getParameters();
pon.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH);
control goes up to abov line but still its not working please help me how to fix this issue
target version is 22 compile with 22