diff --git a/Example/testHotUpdate/android/app/src/main/AndroidManifest.xml b/Example/testHotUpdate/android/app/src/main/AndroidManifest.xml index 8ad92a21..c62962f0 100644 --- a/Example/testHotUpdate/android/app/src/main/AndroidManifest.xml +++ b/Example/testHotUpdate/android/app/src/main/AndroidManifest.xml @@ -2,6 +2,8 @@ package="com.awesomeproject"> + + UIViewControllerBasedStatusBarAppearance + NSCameraUsageDescription + For taking photos + + NSPhotoLibraryUsageDescription + For saving photos diff --git a/Example/testHotUpdate/ios/Podfile.lock b/Example/testHotUpdate/ios/Podfile.lock index a493df32..7a012d9e 100644 --- a/Example/testHotUpdate/ios/Podfile.lock +++ b/Example/testHotUpdate/ios/Podfile.lock @@ -222,17 +222,17 @@ PODS: - glog - react-native-safe-area-context (4.8.2): - React-Core - - react-native-update (10.7.1): + - react-native-update (10.10.0): - React - React-Core - - react-native-update/HDiffPatch (= 10.7.1) - - react-native-update/RCTPushy (= 10.7.1) + - react-native-update/HDiffPatch (= 10.10.0) + - react-native-update/RCTPushy (= 10.10.0) - SSZipArchive - - react-native-update/HDiffPatch (10.7.1): + - react-native-update/HDiffPatch (10.10.0): - React - React-Core - SSZipArchive - - react-native-update/RCTPushy (10.7.1): + - react-native-update/RCTPushy (10.10.0): - React - React-Core - SSZipArchive @@ -302,6 +302,8 @@ PODS: - React-jsi (= 0.69.8) - React-logger (= 0.69.8) - React-perflogger (= 0.69.8) + - ReactNativeCameraKit (14.0.0-beta9): + - React-Core - RNVectorIcons (10.0.3): - React-Core - SSZipArchive (2.4.3) @@ -342,6 +344,7 @@ DEPENDENCIES: - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) + - ReactNativeCameraKit (from `../node_modules/react-native-camera-kit`) - RNVectorIcons (from `../node_modules/react-native-vector-icons`) - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) @@ -417,6 +420,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" ReactCommon: :path: "../node_modules/react-native/ReactCommon" + ReactNativeCameraKit: + :path: "../node_modules/react-native-camera-kit" RNVectorIcons: :path: "../node_modules/react-native-vector-icons" Yoga: @@ -444,7 +449,7 @@ SPEC CHECKSUMS: React-jsinspector: 0eda09e9cf22bbb5dbb1d23143b03a31acf37d67 React-logger: 5997ab008583826c10ffe4e1ff990363e975639d react-native-safe-area-context: 0ee144a6170530ccc37a0fd9388e28d06f516a89 - react-native-update: 04844fca9567508fa79649e23e7209904d9d7a5a + react-native-update: a7f136a3c87183b13c7ff5c4f9d2b614930968ad React-perflogger: ad1416a715d86b32f456e5d0aed99c3b52f1de37 React-RCTActionSheet: cbf7c6a953982562418ee72a1084ff7b9447b558 React-RCTAnimation: 33df3e25824dd7313edec28dded2745542f9352b @@ -457,6 +462,7 @@ SPEC CHECKSUMS: React-RCTVibration: 5462287ee85304ba1a00474665ab292e63a41663 React-runtimeexecutor: 9df680f18497367bcf5c15b6b6406c0f2dfa2b6a ReactCommon: c10f046f3ef8561e7c8e7e9b9dae2ecc9ffc48ef + ReactNativeCameraKit: 4bec78d688adcd68772af2834d5c30a6a8e2a384 RNVectorIcons: bc7ee28cadf39c77a49232a14738dfce690f66cd SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef Yoga: d3820731e0ca3a4933f061ad29defaf7726e3251 diff --git a/Example/testHotUpdate/package.json b/Example/testHotUpdate/package.json index 46ecd745..5a44753f 100644 --- a/Example/testHotUpdate/package.json +++ b/Example/testHotUpdate/package.json @@ -16,9 +16,10 @@ "postinstall-postinstall": "^2.1.0", "react": "18.0.0", "react-native": "0.69.8", + "react-native-camera-kit": "^14.0.0-beta15", "react-native-paper": "^5.12.1", "react-native-safe-area-context": "^4.8.2", - "react-native-update": "^10.7.1", + "react-native-update": "^10.10.0", "react-native-vector-icons": "^10.0.3" }, "devDependencies": { diff --git a/Example/testHotUpdate/src/index.tsx b/Example/testHotUpdate/src/index.tsx index 768da1d2..983f9625 100644 --- a/Example/testHotUpdate/src/index.tsx +++ b/Example/testHotUpdate/src/index.tsx @@ -10,7 +10,16 @@ import { Image, Switch, } from 'react-native'; -import {Icon, PaperProvider, Snackbar, Banner} from 'react-native-paper'; +import { + Icon, + PaperProvider, + Snackbar, + Banner, + Button, + Modal, + Portal, +} from 'react-native-paper'; +import {Camera} from 'react-native-camera-kit'; import TestConsole from './TestConsole'; @@ -28,6 +37,7 @@ function App() { updateInfo, packageVersion, currentHash, + parseTestPayload, progress: {received, total} = {}, } = usePushy(); const [useDefaultAlert, setUseDefaultAlert] = useState(true); @@ -36,6 +46,7 @@ function App() { const [showUpdateSnackbar, setShowUpdateSnackbar] = useState(false); const snackbarVisible = !useDefaultAlert && showUpdateSnackbar && updateInfo?.update; + const [showCamera, setShowCamera] = useState(false); return ( @@ -55,6 +66,23 @@ function App() { }} /> + + + setShowCamera(false)}> + { + console.log(codeStringValue); + parseTestPayload(codeStringValue); + setShowCamera(false); + }} // optional + showFrame={true} // (default false) optional, show frame with transparent layer (qr code or barcode will be read on this area ONLY), start animation for scanner, that stops when a code has been found. Frame always at center of the screen + laserColor="red" // (default red) optional, color of laser in scanner frame + frameColor="white" // (default white) optional, color of border of scanner frame + /> + +