From 93813849093e3692119add885fcb653619bfc630 Mon Sep 17 00:00:00 2001 From: Jason Cao Date: Sat, 5 Oct 2024 22:35:57 -0400 Subject: [PATCH 1/2] First commit --- MyNewProject/.gitignore | 35 + MyNewProject/App.tsx | 20 + MyNewProject/app.json | 30 + MyNewProject/app/index.tsx | 25 + MyNewProject/assets/adaptive-icon.png | Bin 0 -> 17547 bytes MyNewProject/assets/favicon.png | Bin 0 -> 1466 bytes MyNewProject/assets/icon.png | Bin 0 -> 22380 bytes MyNewProject/assets/splash.png | Bin 0 -> 47346 bytes MyNewProject/babel.config.js | 6 + MyNewProject/package-lock.json | 16619 ++++++++++++++++ MyNewProject/package.json | 26 + MyNewProject/tsconfig.json | 6 + android/.gitignore | 16 + android/app/build.gradle | 201 + android/app/debug.keystore | Bin 0 -> 2257 bytes android/app/proguard-rules.pro | 14 + android/app/src/debug/AndroidManifest.xml | 7 + android/app/src/main/AndroidManifest.xml | 39 + .../com/yourcompany/sasehack/MainActivity.kt | 61 + .../yourcompany/sasehack/MainApplication.kt | 55 + .../res/drawable-hdpi/splashscreen_image.png | Bin 0 -> 59836 bytes .../res/drawable-mdpi/splashscreen_image.png | Bin 0 -> 59836 bytes .../res/drawable-xhdpi/splashscreen_image.png | Bin 0 -> 59836 bytes .../drawable-xxhdpi/splashscreen_image.png | Bin 0 -> 59836 bytes .../drawable-xxxhdpi/splashscreen_image.png | Bin 0 -> 59836 bytes .../res/drawable/rn_edit_text_material.xml | 37 + .../src/main/res/drawable/splashscreen.xml | 3 + .../res/mipmap-anydpi-v26/ic_launcher.xml | 5 + .../mipmap-anydpi-v26/ic_launcher_round.xml | 5 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 8377 bytes .../mipmap-hdpi/ic_launcher_foreground.png | Bin 0 -> 8031 bytes .../res/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 10372 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 5199 bytes .../mipmap-mdpi/ic_launcher_foreground.png | Bin 0 -> 5079 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 6526 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 11624 bytes .../mipmap-xhdpi/ic_launcher_foreground.png | Bin 0 -> 11145 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 14257 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 18266 bytes .../mipmap-xxhdpi/ic_launcher_foreground.png | Bin 0 -> 18064 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 22474 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 25203 bytes .../mipmap-xxxhdpi/ic_launcher_foreground.png | Bin 0 -> 25030 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 30705 bytes .../app/src/main/res/values-night/colors.xml | 1 + android/app/src/main/res/values/colors.xml | 6 + android/app/src/main/res/values/strings.xml | 6 + android/app/src/main/res/values/styles.xml | 17 + android/build.gradle | 41 + android/gradle.properties | 59 + android/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 43453 bytes .../gradle/wrapper/gradle-wrapper.properties | 7 + android/gradlew | 249 + android/gradlew.bat | 92 + .../react-settings-plugin/build.gradle.kts | 19 + .../expo/plugins/ReactSettingsPlugin.kt | 10 + android/settings.gradle | 66 + app/ImageAnalysis.tsx | 133 + 58 files changed, 17916 insertions(+) create mode 100644 MyNewProject/.gitignore create mode 100644 MyNewProject/App.tsx create mode 100644 MyNewProject/app.json create mode 100644 MyNewProject/app/index.tsx create mode 100644 MyNewProject/assets/adaptive-icon.png create mode 100644 MyNewProject/assets/favicon.png create mode 100644 MyNewProject/assets/icon.png create mode 100644 MyNewProject/assets/splash.png create mode 100644 MyNewProject/babel.config.js create mode 100644 MyNewProject/package-lock.json create mode 100644 MyNewProject/package.json create mode 100644 MyNewProject/tsconfig.json create mode 100644 android/.gitignore create mode 100644 android/app/build.gradle create mode 100644 android/app/debug.keystore create mode 100644 android/app/proguard-rules.pro create mode 100644 android/app/src/debug/AndroidManifest.xml create mode 100644 android/app/src/main/AndroidManifest.xml create mode 100644 android/app/src/main/java/com/yourcompany/sasehack/MainActivity.kt create mode 100644 android/app/src/main/java/com/yourcompany/sasehack/MainApplication.kt create mode 100644 android/app/src/main/res/drawable-hdpi/splashscreen_image.png create mode 100644 android/app/src/main/res/drawable-mdpi/splashscreen_image.png create mode 100644 android/app/src/main/res/drawable-xhdpi/splashscreen_image.png create mode 100644 android/app/src/main/res/drawable-xxhdpi/splashscreen_image.png create mode 100644 android/app/src/main/res/drawable-xxxhdpi/splashscreen_image.png create mode 100644 android/app/src/main/res/drawable/rn_edit_text_material.xml create mode 100644 android/app/src/main/res/drawable/splashscreen.xml create mode 100644 android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml create mode 100644 android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png create mode 100644 android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png create mode 100644 android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png create mode 100644 android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png create mode 100644 android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png create mode 100644 android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png create mode 100644 android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png create mode 100644 android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png create mode 100644 android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png create mode 100644 android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png create mode 100644 android/app/src/main/res/values-night/colors.xml create mode 100644 android/app/src/main/res/values/colors.xml create mode 100644 android/app/src/main/res/values/strings.xml create mode 100644 android/app/src/main/res/values/styles.xml create mode 100644 android/build.gradle create mode 100644 android/gradle.properties create mode 100644 android/gradle/wrapper/gradle-wrapper.jar create mode 100644 android/gradle/wrapper/gradle-wrapper.properties create mode 100644 android/gradlew create mode 100644 android/gradlew.bat create mode 100644 android/react-settings-plugin/build.gradle.kts create mode 100644 android/react-settings-plugin/src/main/kotlin/expo/plugins/ReactSettingsPlugin.kt create mode 100644 android/settings.gradle create mode 100644 app/ImageAnalysis.tsx 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 +