From 5cf454c6800d6bfe26e08c6b4393b82bff442b4d Mon Sep 17 00:00:00 2001 From: Maksymilian Jopek Date: Thu, 3 Mar 2022 22:57:17 +0100 Subject: Initial commit - v1.0.0 --- components/Home.js | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 components/Home.js (limited to 'components/Home.js') diff --git a/components/Home.js b/components/Home.js new file mode 100644 index 0000000..fb857c5 --- /dev/null +++ b/components/Home.js @@ -0,0 +1,60 @@ +import * as React from 'react'; +import { View, Text, StyleSheet, TouchableOpacity } from 'react-native'; +import * as MediaLibrary from "expo-media-library"; +import * as ECamera from "expo-camera"; + +export default class Home extends React.Component { + constructor(props) { + super(props) + this.state = {} + } + + async componentDidMount() { + const { status } = await MediaLibrary.requestPermissionsAsync(); + if (status !== 'granted') { + alert('brak uprawnień do czytania image-ów z galerii') + } + const status2 = (await ECamera.requestCameraPermissionsAsync()).status; + console.log(status2) + if (status2 !== 'granted') { + alert('brak uprawnień do wykonywania zdjec') + } + } + + render() { + return ( + + this.props.navigation.navigate("gallery")}>CAMERA{"\n"}SETTINGS App + Change camera white balance + Change camera flash mode + Change camera picture size + Change camera camera ratio + + ) + } +} + +const styles = StyleSheet.create({ + cont: { + flexDirection: "column", + marginTop: 10, + paddingTop: 10, + backgroundColor: "#EB1F63", + justifyContent: "center", + alignItems: "center", + height: "100%", + }, + btn: { + margin: 10, + }, + h1: { + color: "white", + fontSize: 55, + fontWeight: "bold", + textAlign: "center", + }, + span: { + color: "white", + fontSize: 22, + } +}) -- cgit v1.3.1