diff --git a/MyNewProject/.gitignore b/MyNewProject/.gitignore new file mode 100644 index 0000000..05647d5 --- /dev/null +++ b/MyNewProject/.gitignore @@ -0,0 +1,35 @@ +# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files + +# dependencies +node_modules/ + +# Expo +.expo/ +dist/ +web-build/ + +# Native +*.orig.* +*.jks +*.p8 +*.p12 +*.key +*.mobileprovision + +# Metro +.metro-health-check* + +# debug +npm-debug.* +yarn-debug.* +yarn-error.* + +# macOS +.DS_Store +*.pem + +# local env files +.env*.local + +# typescript +*.tsbuildinfo diff --git a/MyNewProject/App.tsx b/MyNewProject/App.tsx new file mode 100644 index 0000000..0329d0c --- /dev/null +++ b/MyNewProject/App.tsx @@ -0,0 +1,20 @@ +import { StatusBar } from 'expo-status-bar'; +import { StyleSheet, Text, View } from 'react-native'; + +export default function App() { + return ( + + Open up App.tsx to start working on your app! + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: '#fff', + alignItems: 'center', + justifyContent: 'center', + }, +}); diff --git a/MyNewProject/app.json b/MyNewProject/app.json new file mode 100644 index 0000000..a688491 --- /dev/null +++ b/MyNewProject/app.json @@ -0,0 +1,30 @@ +{ + "expo": { + "name": "MyNewProject", + "slug": "MyNewProject", + "version": "1.0.0", + "orientation": "portrait", + "icon": "./assets/icon.png", + "userInterfaceStyle": "light", + "splash": { + "image": "./assets/splash.png", + "resizeMode": "contain", + "backgroundColor": "#ffffff" + }, + "ios": { + "supportsTablet": true + }, + "android": { + "adaptiveIcon": { + "foregroundImage": "./assets/adaptive-icon.png", + "backgroundColor": "#ffffff" + } + }, + "web": { + "favicon": "./assets/favicon.png" + }, + "plugins": [ + "expo-router" + ] + } +} diff --git a/MyNewProject/app/index.tsx b/MyNewProject/app/index.tsx new file mode 100644 index 0000000..79d454e --- /dev/null +++ b/MyNewProject/app/index.tsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { View, Text, Button } from 'react-native'; +import * as ImagePicker from 'expo-image-picker'; + +export default function Index() { + const pickImage = async () => { + let result = await ImagePicker.launchImageLibraryAsync({ + mediaTypes: ImagePicker.MediaTypeOptions.Images, + allowsEditing: true, + aspect: [4, 3], + quality: 1, + }); + + if (!result.canceled) { + console.log(result.assets[0].uri); + } + }; + + return ( + + Image Picker Test +