camerja
camerja copied to clipboard
Vibration.vibrate can't work before recordAsync
takePicture = async function() { if (this.camera) { if(this.state.recording==false) { Vibration.vibrate();//---->just only work at first time this.setState({ takeIcon:'stop-circle-outline', recording:true, }); this.camera.recordAsync({"quality":"4:3","maxDuration":10}).then(data => { Vibration.vibrate();//---->every time can work ,good boy. }); } else { this.camera.stopRecording(); this.setState({ takeIcon:'radiobox-marked', recording:false, }); } } };
but I try take picture with vibrate like the sample is work, so...why...I am ios