I explored this topic because a huge part of my daily routine includes spending time on my phone, using social media apps, and giving them access to everything I store on them. Hence, as a developer, I had the chance to see how I can work with such hardware features. For this research I dived into the world of cross-platform development and React Native. I implemented a mobile application using Expo CLI and React Native which required access to the camera of the phone. For this I researched permissions, security and mostly the camera component. With the use of “Camera”, one can also take photos and record videos that are then saved to the app's cache. Moreover, the component is also capable of detecting faces and bar codes appearing in the preview.
I recently discovered how interested I am in the mobile development field. For this reason, I decided to explore React Native and Expo CLI that allow you to create mobile apps for both IOS and Android using one codebase. A big advantage of Expo CLI is that it handles many functionalities for you. One example is the permissions which I explored a bit in this project and they are handled automatically by Expo.
Built with
Accesing the camera feature on your phone.
- Step 1: git clone https://github.com/Miimkkaa/CameraAccess-ReactNative.git
- Step 2: run npm install
- Step 3: download 'Expo go' from AppStore/GooglePlay
- Step 4: run the project with "expo start" command
- Step 5: scan the QR code
- Step 6: enjoy :)
https://www.freecodecamp.org/news/how-to-create-a-camera-app-with-expo-and-react-native/ https://github.com/hayanisaid/expo-camera-tutorial/tree/master
Author: Said Hayani
MIT © Milena Ognianova