diff --git a/.expo-shared/assets.json b/.expo-shared/assets.json new file mode 100644 index 0000000..1e6decf --- /dev/null +++ b/.expo-shared/assets.json @@ -0,0 +1,4 @@ +{ + "12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true, + "40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true +} diff --git a/.gitignore b/.gitignore index 1bef217..ccc54b6 100644 --- a/.gitignore +++ b/.gitignore @@ -395,4 +395,7 @@ Temporary Items # Ignore all local history of files .history -# End of https://www.toptal.com/developers/gitignore/api/reactnative,visualstudiocode,pycharm+all \ No newline at end of file +# End of https://www.toptal.com/developers/gitignore/api/reactnative,visualstudiocode,pycharm+all + +.expo +.expo-shared diff --git a/.watchmanconfig b/.watchmanconfig deleted file mode 100644 index 0967ef4..0000000 --- a/.watchmanconfig +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/App.js b/App.js deleted file mode 100644 index 07adf85..0000000 --- a/App.js +++ /dev/null @@ -1,46 +0,0 @@ -import React, { useState, useEffect } from 'react'; -import { Text, View, StyleSheet, Button } from 'react-native'; -import { BarCodeScanner } from 'expo-barcode-scanner'; - -export default function App() { - const [hasPermission, setHasPermission] = useState(null); - const [scanned, setScanned] = useState(false); - - useEffect(() => { - (async () => { - const { status } = await BarCodeScanner.requestPermissionsAsync(); - setHasPermission(status === 'granted'); - })(); - }, []); - - const handleBarCodeScanned = ({ type, data }) => { - setScanned(true); - const timeInt = new Date().getTime(); - const locationStr = '4321'; - const newData = `${data}-${timeInt}-${locationStr}`; - alert(`Bar code with type ${type} and data ${data} has been scanned! Data to print on new bar code: ${newData}`); - }; - - if (hasPermission === null) { - return Requesting for camera permission; - } - if (hasPermission === false) { - return No access to camera; - } - - return ( - - - - {scanned &&