CAMERA MODULE:
import ImagePicker from 'react-native-image-crop-picker';
Functioning:
Router.js is called from the index file in starting and from thereon process is continued.
Total Files: (in Cam folder)
-
Router.js --> Contains one scene component ( ProfilePic ) where everything from displaying pic to capturing and taking pic from gallery happens.
-
styles.js --> Contains styling for the components used in ProfilePic.js.
-
ProfilePic.js --> Main component of the module is in this file.
-
unknown.jpg --> Default Pic for displaying as Profile pic.
Note: Proper comments have been inserted in these files for proper understanding.
git clone https://github.com/goyalanshu/ImagePicker.git
-
Install npm modules in your project directory
$ npm install
-
Install third party libraries used in this project
$ npm install react-native-image-crop-picker $ npm install react-native-router-flux
-
Link these installed libraries by:
$ react-native link
-
For running the app:
$ react-native run-android
- @ Girish Kumar Gupta The main Author