From a9fd12208a273356180eba2b9c09209fa1d19e65 Mon Sep 17 00:00:00 2001 From: Aaron Louie Date: Fri, 28 Aug 2020 15:35:51 -0400 Subject: [PATCH] Adds basic project files --- .gitignore | 398 + .watchmanconfig | 1 + App.js | 46 + android/app/BUCK | 55 + android/app/build.gradle | 224 + android/app/build_defs.bzl | 19 + android/app/debug.keystore | Bin 0 -> 2257 bytes android/app/proguard-rules.pro | 10 + android/app/src/debug/AndroidManifest.xml | 7 + .../ReactNativeFlipper.java | 69 + android/app/src/main/AndroidManifest.xml | 43 + .../virginia/covid19/kiosk/MainActivity.java | 41 + .../covid19/kiosk/MainApplication.java | 120 + .../kiosk/generated/BasePackageList.java | 24 + .../src/main/res/drawable/splashscreen.xml | 7 + .../main/res/drawable/splashscreen_image.png | Bin 0 -> 9306 bytes .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 3056 bytes .../res/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 5024 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 2096 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 2858 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 4569 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 7098 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 6464 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 10676 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 9250 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 15523 bytes android/app/src/main/res/values/colors.xml | 5 + android/app/src/main/res/values/strings.xml | 3 + android/app/src/main/res/values/styles.xml | 11 + android/build.gradle | 38 + android/gradle.properties | 29 + android/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 53639 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 + android/gradlew | 188 + android/gradlew.bat | 100 + android/settings.gradle | 9 + app.json | 38 + assets/favicon.png | Bin 0 -> 1466 bytes assets/icon.png | Bin 0 -> 642 bytes assets/splash.png | Bin 0 -> 9306 bytes babel.config.js | 6 + index.js | 8 + ios/Podfile | 92 + .../project.pbxproj | 466 + .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../basicbarcodescannerusage.xcscheme | 88 + ios/basicbarcodescannerusage/AppDelegate.h | 10 + ios/basicbarcodescannerusage/AppDelegate.m | 99 + .../Base.lproj/LaunchScreen.xib | 42 + .../AppIcon.appiconset/App-Icon-20x20@1x.png | Bin 0 -> 331 bytes .../AppIcon.appiconset/App-Icon-20x20@2x.png | Bin 0 -> 627 bytes .../AppIcon.appiconset/App-Icon-20x20@3x.png | Bin 0 -> 1208 bytes .../AppIcon.appiconset/App-Icon-29x29@1x.png | Bin 0 -> 430 bytes .../AppIcon.appiconset/App-Icon-29x29@2x.png | Bin 0 -> 1231 bytes .../AppIcon.appiconset/App-Icon-29x29@3x.png | Bin 0 -> 1472 bytes .../AppIcon.appiconset/App-Icon-40x40@1x.png | Bin 0 -> 627 bytes .../AppIcon.appiconset/App-Icon-40x40@2x.png | Bin 0 -> 1346 bytes .../AppIcon.appiconset/App-Icon-40x40@3x.png | Bin 0 -> 2085 bytes .../AppIcon.appiconset/App-Icon-60x60@2x.png | Bin 0 -> 2085 bytes .../AppIcon.appiconset/App-Icon-60x60@3x.png | Bin 0 -> 2958 bytes .../AppIcon.appiconset/App-Icon-76x76@1x.png | Bin 0 -> 1366 bytes .../AppIcon.appiconset/App-Icon-76x76@2x.png | Bin 0 -> 2675 bytes .../App-Icon-83.5x83.5@2x.png | Bin 0 -> 2825 bytes .../AppIcon.appiconset/Contents.json | 122 + .../AppIcon.appiconset/ItunesArtwork@2x.png | Bin 0 -> 24699 bytes .../Images.xcassets/Contents.json | 6 + .../SplashScreen.imageset/Contents.json | 21 + .../SplashScreen.imageset/splashscreen.png | Bin 0 -> 9306 bytes .../Contents.json | 21 + .../background.png | Bin 0 -> 80 bytes ios/basicbarcodescannerusage/Info.plist | 69 + .../SplashScreen.storyboard | 91 + .../Supporting/Expo.plist | 16 + .../kiosk.entitlements | 5 + ios/basicbarcodescannerusage/main.m | 10 + metro.config.js | 6 + package-lock.json | 15302 ++++++++++++++++ package.json | 42 + 79 files changed, 18027 insertions(+) create mode 100644 .gitignore create mode 100644 .watchmanconfig create mode 100644 App.js create mode 100644 android/app/BUCK create mode 100644 android/app/build.gradle create mode 100644 android/app/build_defs.bzl 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/debug/java/com/basicbarcodescannerusage/ReactNativeFlipper.java create mode 100644 android/app/src/main/AndroidManifest.xml create mode 100644 android/app/src/main/java/edu/virginia/covid19/kiosk/MainActivity.java create mode 100644 android/app/src/main/java/edu/virginia/covid19/kiosk/MainApplication.java create mode 100644 android/app/src/main/java/edu/virginia/covid19/kiosk/generated/BasePackageList.java create mode 100644 android/app/src/main/res/drawable/splashscreen.xml create mode 100644 android/app/src/main/res/drawable/splashscreen_image.png 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_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_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_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_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_round.png 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 100755 android/gradlew create mode 100644 android/gradlew.bat create mode 100644 android/settings.gradle create mode 100644 app.json create mode 100644 assets/favicon.png create mode 100644 assets/icon.png create mode 100644 assets/splash.png create mode 100644 babel.config.js create mode 100644 index.js create mode 100644 ios/Podfile create mode 100644 ios/basicbarcodescannerusage.xcodeproj/project.pbxproj create mode 100644 ios/basicbarcodescannerusage.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 ios/basicbarcodescannerusage.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 ios/basicbarcodescannerusage.xcodeproj/xcshareddata/xcschemes/basicbarcodescannerusage.xcscheme create mode 100644 ios/basicbarcodescannerusage/AppDelegate.h create mode 100644 ios/basicbarcodescannerusage/AppDelegate.m create mode 100644 ios/basicbarcodescannerusage/Base.lproj/LaunchScreen.xib create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/AppIcon.appiconset/App-Icon-20x20@1x.png create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/AppIcon.appiconset/App-Icon-20x20@2x.png create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/AppIcon.appiconset/App-Icon-20x20@3x.png create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/AppIcon.appiconset/App-Icon-29x29@1x.png create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/AppIcon.appiconset/App-Icon-29x29@2x.png create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/AppIcon.appiconset/App-Icon-29x29@3x.png create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/AppIcon.appiconset/App-Icon-40x40@1x.png create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/AppIcon.appiconset/App-Icon-40x40@2x.png create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/AppIcon.appiconset/App-Icon-40x40@3x.png create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/AppIcon.appiconset/App-Icon-60x60@2x.png create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/AppIcon.appiconset/App-Icon-60x60@3x.png create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/AppIcon.appiconset/App-Icon-76x76@1x.png create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/AppIcon.appiconset/App-Icon-76x76@2x.png create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/AppIcon.appiconset/App-Icon-83.5x83.5@2x.png create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/Contents.json create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/SplashScreen.imageset/Contents.json create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/SplashScreen.imageset/splashscreen.png create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/SplashScreenBackground.imageset/Contents.json create mode 100644 ios/basicbarcodescannerusage/Images.xcassets/SplashScreenBackground.imageset/background.png create mode 100644 ios/basicbarcodescannerusage/Info.plist create mode 100644 ios/basicbarcodescannerusage/SplashScreen.storyboard create mode 100644 ios/basicbarcodescannerusage/Supporting/Expo.plist create mode 100644 ios/basicbarcodescannerusage/kiosk.entitlements create mode 100644 ios/basicbarcodescannerusage/main.m create mode 100644 metro.config.js create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1bef217 --- /dev/null +++ b/.gitignore @@ -0,0 +1,398 @@ + +# Created by https://www.toptal.com/developers/gitignore/api/reactnative,visualstudiocode,pycharm+all +# Edit at https://www.toptal.com/developers/gitignore?templates=reactnative,visualstudiocode,pycharm+all + +### PyCharm+all ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### PyCharm+all Patch ### +# Ignores the whole .idea folder and all .iml files +# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360 + +.idea/ + +# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023 + +*.iml +modules.xml +.idea/misc.xml +*.ipr + +# Sonarlint plugin +.idea/sonarlint + +### ReactNative ### +# React Native Stack Base + +.expo +__generated__ + +### ReactNative.Android Stack ### +# Built application files +*.apk +*.aar +*.ap_ +*.aab + +# Files for the ART/Dalvik VM +*.dex + +# Java class files +*.class + +# Generated files +bin/ +gen/ +# Uncomment the following line in case you need and you don't have the release build type files in your app +# release/ + +# Gradle files +.gradle/ +build/ + +# Local configuration file (sdk path, etc) +local.properties + +# Proguard folder generated by Eclipse +proguard/ + +# Log Files +*.log + +# Android Studio Navigation editor temp files +.navigation/ + +# Android Studio captures folder +captures/ + +# IntelliJ +.idea/workspace.xml +.idea/tasks.xml +.idea/gradle.xml +.idea/assetWizardSettings.xml +.idea/dictionaries +.idea/libraries +# Android Studio 3 in .gitignore file. +.idea/caches +.idea/modules.xml +# Comment next line if keeping position of elements in Navigation Editor is relevant for you +.idea/navEditor.xml + +# Keystore files +# Uncomment the following lines if you do not want to check your keystore files in. +#*.jks +#*.keystore + +# External native build folder generated in Android Studio 2.2 and later +.externalNativeBuild +.cxx/ + +# Google Services (e.g. APIs or Firebase) +# google-services.json + +# Freeline +freeline.py +freeline/ +freeline_project_description.json + +# fastlane +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output +fastlane/readme.md + +# Version control +vcs.xml + +# lint +lint/intermediates/ +lint/generated/ +lint/outputs/ +lint/tmp/ +# lint/reports/ + +### ReactNative.Buck Stack ### +buck-out/ +.buckconfig.local +.buckd/ +.buckversion +.fakebuckversion + +### ReactNative.Gradle Stack ### +.gradle + +# Ignore Gradle GUI config +gradle-app.setting + +# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) +!gradle-wrapper.jar + +# Cache of project +.gradletasknamecache + +# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 +# gradle/wrapper/gradle-wrapper.properties + +### ReactNative.Linux Stack ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### ReactNative.Node Stack ### +# Logs +logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# Next.js build output +.next + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +### ReactNative.Xcode Stack ### +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) +DerivedData/ +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 + +## Gcc Patch +/*.gcno + +### ReactNative.macOS Stack ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history + +# End of https://www.toptal.com/developers/gitignore/api/reactnative,visualstudiocode,pycharm+all \ No newline at end of file diff --git a/.watchmanconfig b/.watchmanconfig new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/.watchmanconfig @@ -0,0 +1 @@ +{} diff --git a/App.js b/App.js new file mode 100644 index 0000000..07adf85 --- /dev/null +++ b/App.js @@ -0,0 +1,46 @@ +import React, { useState, useEffect } from 'react'; +import { Text, View, StyleSheet, Button } from 'react-native'; +import { BarCodeScanner } from 'expo-barcode-scanner'; + +export default function App() { + const [hasPermission, setHasPermission] = useState(null); + const [scanned, setScanned] = useState(false); + + useEffect(() => { + (async () => { + const { status } = await BarCodeScanner.requestPermissionsAsync(); + setHasPermission(status === 'granted'); + })(); + }, []); + + const handleBarCodeScanned = ({ type, data }) => { + setScanned(true); + const timeInt = new Date().getTime(); + const locationStr = '4321'; + const newData = `${data}-${timeInt}-${locationStr}`; + alert(`Bar code with type ${type} and data ${data} has been scanned! Data to print on new bar code: ${newData}`); + }; + + if (hasPermission === null) { + return Requesting for camera permission; + } + if (hasPermission === false) { + return No access to camera; + } + + return ( + + + + {scanned &&