diff --git a/src/App.js b/src/App.js
index 0eb3621..9216542 100644
--- a/src/App.js
+++ b/src/App.js
@@ -8,6 +8,8 @@ import openDatabase from "./app/database/database-connection";
import initDatabase from "./app/database/database-init";
import FlashMessage from "react-native-flash-message";
+import LaunchCamera from "./app/components/LaunchCamera";
+
export default function App() {
global.userDataBase = openDatabase();
initDatabase(global.userDataBase);
@@ -17,5 +19,6 @@ export default function App() {
+ /**/
);
}
diff --git a/src/app/components/LaunchCamera.js b/src/app/components/LaunchCamera.js
new file mode 100644
index 0000000..d7bb02c
--- /dev/null
+++ b/src/app/components/LaunchCamera.js
@@ -0,0 +1,54 @@
+import React from "react";
+import { StyleSheet, Text, View, SafeAreaView, Image, Button } from "react-native";
+import * as ImagePicker from "expo-image-picker";
+import { useState, useEffect } from "react";
+import * as Permissions from 'expo-permissions';
+function LaunchCamera() {
+ const [image, setImage] = useState();
+
+ const takePicture = async () => {
+ await Permissions.askAsync(Permissions.CAMERA);
+ const { cancelled, uri } = await ImagePicker.launchCameraAsync({
+ allowsEditing: false,
+ });
+ setImage({ image: uri });
+ };
+
+ const handlePress = () => {
+ takePicture();
+ };
+
+ return (
+
+
+
+
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ backgroundColor: '#ffffff',
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+ text: {
+ fontSize: 21,
+ },
+ row: {
+ flexDirection: 'row'
+ },
+ image: {
+ width: 300, height: 300, backgroundColor: 'gray'
+ },
+ button: {
+ padding: 13,
+ margin: 15,
+ backgroundColor: '#dddddd',
+ },
+})
+
+export default LaunchCamera;
\ No newline at end of file