react-native-flash
Simple API to turn on and off flash in react native
Installation
npm install react-native-flash
react-native link react-native-flash
Usage
In your index.android.js
:
; RNFlash; // turn on flash RNFlash; // turn off flash /*Has flash checks if the phone has flash available. Since all communication between react native and native modules is asychrounous, it takes a success callback, and failure callback. atm both callbacks are necessary. */ RNFlash;});
TODO
- Any Suggestions?