{"action":"created","issue":{"url":"https://api.github.com/repos/moaazsidat/react-native-qrcode-scanner/issues/87","repository_url":"https://api.github.com/repos/moaazsidat/react-native-qrcode-scanner","labels_url":"https://api.github.com/repos/moaazsidat/react-native-qrcode-scanner/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/moaazsidat/react-native-qrcode-scanner/issues/87/comments","events_url":"https://api.github.com/repos/moaazsidat/react-native-qrcode-scanner/issues/87/events","html_url":"https://github.com/moaazsidat/react-native-qrcode-scanner/issues/87","id":312787622,"number":87,"title":"How do I turn on the flash when I scan the code?","user":{"login":"WinterHuang3","id":19779539,"avatar_url":"https://avatars1.githubusercontent.com/u/19779539?v=4","gravatar_id":"","url":"https://api.github.com/users/WinterHuang3","html_url":"https://github.com/WinterHuang3","followers_url":"https://api.github.com/users/WinterHuang3/followers","following_url":"https://api.github.com/users/WinterHuang3/following{/other_user}","gists_url":"https://api.github.com/users/WinterHuang3/gists{/gist_id}","starred_url":"https://api.github.com/users/WinterHuang3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WinterHuang3/subscriptions","organizations_url":"https://api.github.com/users/WinterHuang3/orgs","repos_url":"https://api.github.com/users/WinterHuang3/repos","events_url":"https://api.github.com/users/WinterHuang3/events{/privacy}","received_events_url":"https://api.github.com/users/WinterHuang3/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-10T06:24:15Z","updated_at":"2018-04-10T16:08:13Z","closed_at":null,"author_association":"NONE","body":"  @ReactMethod\r\n    public void operFlashLight(boolean flag, Promise promise) {\r\n        boolean result = true;\r\n        RCTCamera.createInstance(getDeviceOrientation(mReactContext));\r\n        if (flag) {\r\n            RCTCamera.getInstance().setFlashMode(RCTCameraModule.RCT_CAMERA_TYPE_BACK, RCTCameraModule.RCT_CAMERA_TORCH_MODE_AUTO);\r\n        } else {\r\n            RCTCamera.getInstance().setFlashMode(RCTCameraModule.RCT_CAMERA_TYPE_BACK, RCTCameraModule.RCT_CAMERA_FLASH_MODE_OFF);\r\n        }\r\n        if (!result) {\r\n            Toast.makeText(App.sInstance.getCurActivity(), R.string.msg_camera_denied, Toast.LENGTH_SHORT).show();\r\n        }\r\n        promise.resolve(result);\r\n    }\r\n\r\nThe above method doesn't work."},"comment":{"url":"https://api.github.com/repos/moaazsidat/react-native-qrcode-scanner/issues/comments/380157446","html_url":"https://github.com/moaazsidat/react-native-qrcode-scanner/issues/87#issuecomment-380157446","issue_url":"https://api.github.com/repos/moaazsidat/react-native-qrcode-scanner/issues/87","id":380157446,"user":{"login":"moaazsidat","id":5963656,"avatar_url":"https://avatars3.githubusercontent.com/u/5963656?v=4","gravatar_id":"","url":"https://api.github.com/users/moaazsidat","html_url":"https://github.com/moaazsidat","followers_url":"https://api.github.com/users/moaazsidat/followers","following_url":"https://api.github.com/users/moaazsidat/following{/other_user}","gists_url":"https://api.github.com/users/moaazsidat/gists{/gist_id}","starred_url":"https://api.github.com/users/moaazsidat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moaazsidat/subscriptions","organizations_url":"https://api.github.com/users/moaazsidat/orgs","repos_url":"https://api.github.com/users/moaazsidat/repos","events_url":"https://api.github.com/users/moaazsidat/events{/privacy}","received_events_url":"https://api.github.com/users/moaazsidat/received_events","type":"User","site_admin":false},"created_at":"2018-04-10T16:08:13Z","updated_at":"2018-04-10T16:08:13Z","author_association":"OWNER","body":"@WinterHuang3 i don't think the `flashMode` prop is being passed down to RNCamera, that's because this library isn't passing down all props to react-native-camera. Initially when I built this library, it was for a very specific simple 'plug-and-play' use case. \r\n\r\nin order to enable that feature, we'll also need to provide some UI around it in the library, please feel free to put up a PR if you think that use case is very important. Otherwise, I can work on that over the course of the next couple of weeks. "}}
{"actor":{"display_login":"moaazsidat"}}