moonyeju 2023-11-14
[FEAT] fogapp
@e97f5a476c7d18c48c8d6994625efd29d1677f64
 
.buckconfig (added)
+++ .buckconfig
@@ -0,0 +1,6 @@
+
+[android]
+  target = Google Inc.:Google APIs:23
+
+[maven_repositories]
+  central = https://repo1.maven.org/maven2
 
.bundle/config (added)
+++ .bundle/config
@@ -0,0 +1,2 @@
+BUNDLE_PATH: "vendor/bundle"
+BUNDLE_FORCE_RUBY_PLATFORM: 1
 
.eslintrc.js (added)
+++ .eslintrc.js
@@ -0,0 +1,7 @@
+module.exports = {
+  root: true,
+  extends: '@react-native',
+  parser: '@babel/eslint-parser',
+  parserOptions: {requireConfigFile: 'false'},
+  babelOptions: {configFile: './.babelrc'},
+};
 
.flowconfig (added)
+++ .flowconfig
@@ -0,0 +1,66 @@
+[ignore]
+; We fork some components by platform
+.*/*[.]android.js
+
+; Ignore "BUCK" generated dirs
+<PROJECT_ROOT>/\.buckd/
+
+; Ignore polyfills
+node_modules/react-native/Libraries/polyfills/.*
+
+; Flow doesn't support platforms
+.*/Libraries/Utilities/LoadingView.js
+
+.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
+
+[untyped]
+.*/node_modules/@react-native-community/cli/.*/.*
+
+[include]
+
+[libs]
+node_modules/react-native/interface.js
+node_modules/react-native/flow/
+
+[options]
+emoji=true
+
+exact_by_default=true
+
+format.bracket_spacing=false
+
+module.file_ext=.js
+module.file_ext=.json
+module.file_ext=.ios.js
+
+munge_underscores=true
+
+module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
+module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
+
+suppress_type=$FlowIssue
+suppress_type=$FlowFixMe
+suppress_type=$FlowFixMeProps
+suppress_type=$FlowFixMeState
+
+[lints]
+sketchy-null-number=warn
+sketchy-null-mixed=warn
+sketchy-number=warn
+untyped-type-import=warn
+nonstrict-import=warn
+deprecated-type=warn
+unsafe-getters-setters=warn
+unnecessary-invariant=warn
+
+[strict]
+deprecated-type
+nonstrict-import
+sketchy-null
+unclear-type
+unsafe-getters-setters
+untyped-import
+untyped-type-import
+
+[version]
+^0.182.0
 
.gitignore (added)
+++ .gitignore
@@ -0,0 +1,66 @@
+src/url.js
+# OSX
+#
+.DS_Store
+
+# Xcode
+#
+build/
+*.pbxuser
+!default.pbxuser
+*.mode1v3
+!default.mode1v3
+*.mode2v3
+!default.mode2v3
+*.perspectivev3
+!default.perspectivev3
+xcuserdata
+*.xccheckout
+*.moved-aside
+DerivedData
+*.hmap
+*.ipa
+*.xcuserstate
+ios/.xcode.env.local
+
+# Android/IntelliJ
+#
+build/
+.idea
+.gradle
+local.properties
+*.iml
+*.hprof
+.cxx/
+
+# node.js
+#
+node_modules/
+npm-debug.log
+yarn-error.log
+
+# BUCK
+buck-out/
+\.buckd/
+*.keystore
+!debug.keystore
+
+# fastlane
+#
+# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
+# screenshots whenever they are needed.
+# For more information about the recommended setup visit:
+# https://docs.fastlane.tools/best-practices/source-control/
+
+**/fastlane/report.xml
+**/fastlane/Preview.html
+**/fastlane/screenshots
+**/fastlane/test_output
+
+# Bundle artifact
+*.jsbundle
+
+# Ruby / CocoaPods
+/ios/Pods/
+/vendor/bundle/
+.vscode/(파일 끝에 줄바꿈 문자 없음)
 
.node-version (added)
+++ .node-version
@@ -0,0 +1,1 @@
+16
 
.prettierrc.js (added)
+++ .prettierrc.js
@@ -0,0 +1,7 @@
+module.exports = {
+  arrowParens: 'avoid',
+  bracketSameLine: true,
+  bracketSpacing: false,
+  singleQuote: true,
+  trailingComma: 'all',
+};
 
.ruby-version (added)
+++ .ruby-version
@@ -0,0 +1,1 @@
+2.7.5
 
.watchmanconfig (added)
+++ .watchmanconfig
@@ -0,0 +1,1 @@
+{}(파일 끝에 줄바꿈 문자 없음)
 
App.js (added)
+++ App.js
@@ -0,0 +1,18 @@
+import React from 'react';
+// import {PermissionsAndroid} from 'react-native';
+import {GestureHandlerRootView} from 'react-native-gesture-handler';
+import AuthProvider from './src/context/AuthContext';
+import MapProvider from './src/context/MapContext';
+import AppNav from './src/navigator/AppNav';
+
+export default function App() {
+  return (
+    <AuthProvider>
+      <MapProvider>
+        <GestureHandlerRootView style={{flex: 1}}>
+          <AppNav />
+        </GestureHandlerRootView>
+      </MapProvider>
+    </AuthProvider>
+  );
+}
 
Gemfile (added)
+++ Gemfile
@@ -0,0 +1,6 @@
+source 'https://rubygems.org'
+
+# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
+ruby '2.7.5'
+
+gem 'cocoapods', '~> 1.11', '>= 1.11.2'
 
__tests__/App-test.js (added)
+++ __tests__/App-test.js
@@ -0,0 +1,14 @@
+/**
+ * @format
+ */
+
+import 'react-native';
+import React from 'react';
+import App from '../App';
+
+// Note: test renderer must be required after react-native.
+import renderer from 'react-test-renderer';
+
+it('renders correctly', () => {
+  renderer.create(<App />);
+});
 
android/app/_BUCK (added)
+++ android/app/_BUCK
@@ -0,0 +1,55 @@
+# To learn about Buck see [Docs](https://buckbuild.com/).
+# To run your application with Buck:
+# - install Buck
+# - `npm start` - to start the packager
+# - `cd android`
+# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
+# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
+# - `buck install -r android/app` - compile, install and run application
+#
+
+load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
+
+lib_deps = []
+
+create_aar_targets(glob(["libs/*.aar"]))
+
+create_jar_targets(glob(["libs/*.jar"]))
+
+android_library(
+    name = "all-libs",
+    exported_deps = lib_deps,
+)
+
+android_library(
+    name = "app-code",
+    srcs = glob([
+        "src/main/java/**/*.java",
+    ]),
+    deps = [
+        ":all-libs",
+        ":build_config",
+        ":res",
+    ],
+)
+
+android_build_config(
+    name = "build_config",
+    package = "com.aitron",
+)
+
+android_resource(
+    name = "res",
+    package = "com.aitron",
+    res = "src/main/res",
+)
+
+android_binary(
+    name = "app",
+    keystore = "//android/keystores:debug",
+    manifest = "src/main/AndroidManifest.xml",
+    package_type = "debug",
+    deps = [
+        ":app-code",
+    ],
+)
 
android/app/build.gradle (added)
+++ android/app/build.gradle
@@ -0,0 +1,322 @@
+apply plugin: "com.android.application"
+apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
+
+import com.android.build.OutputFile
+import org.apache.tools.ant.taskdefs.condition.Os
+
+/**
+ * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
+ * and bundleReleaseJsAndAssets).
+ * These basically call `react-native bundle` with the correct arguments during the Android build
+ * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
+ * bundle directly from the development server. Below you can see all the possible configurations
+ * and their defaults. If you decide to add a configuration block, make sure to add it before the
+ * `apply from: "../../node_modules/react-native/react.gradle"` line.
+ *
+ * project.ext.react = [
+ *   // the name of the generated asset file containing your JS bundle
+ *   bundleAssetName: "index.android.bundle",
+ *
+ *   // the entry file for bundle generation. If none specified and
+ *   // "index.android.js" exists, it will be used. Otherwise "index.js" is
+ *   // default. Can be overridden with ENTRY_FILE environment variable.
+ *   entryFile: "index.android.js",
+ *
+ *   // https://reactnative.dev/docs/performance#enable-the-ram-format
+ *   bundleCommand: "ram-bundle",
+ *
+ *   // whether to bundle JS and assets in debug mode
+ *   bundleInDebug: false,
+ *
+ *   // whether to bundle JS and assets in release mode
+ *   bundleInRelease: true,
+ *
+ *   // whether to bundle JS and assets in another build variant (if configured).
+ *   // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
+ *   // The configuration property can be in the following formats
+ *   //         'bundleIn${productFlavor}${buildType}'
+ *   //         'bundleIn${buildType}'
+ *   // bundleInFreeDebug: true,
+ *   // bundleInPaidRelease: true,
+ *   // bundleInBeta: true,
+ *
+ *   // whether to disable dev mode in custom build variants (by default only disabled in release)
+ *   // for example: to disable dev mode in the staging build type (if configured)
+ *   devDisabledInStaging: true,
+ *   // The configuration property can be in the following formats
+ *   //         'devDisabledIn${productFlavor}${buildType}'
+ *   //         'devDisabledIn${buildType}'
+ *
+ *   // the root of your project, i.e. where "package.json" lives
+ *   root: "../../",
+ *
+ *   // where to put the JS bundle asset in debug mode
+ *   jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
+ *
+ *   // where to put the JS bundle asset in release mode
+ *   jsBundleDirRelease: "$buildDir/intermediates/assets/release",
+ *
+ *   // where to put drawable resources / React Native assets, e.g. the ones you use via
+ *   // require('./image.png')), in debug mode
+ *   resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
+ *
+ *   // where to put drawable resources / React Native assets, e.g. the ones you use via
+ *   // require('./image.png')), in release mode
+ *   resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
+ *
+ *   // by default the gradle tasks are skipped if none of the JS files or assets change; this means
+ *   // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
+ *   // date; if you have any other folders that you want to ignore for performance reasons (gradle
+ *   // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
+ *   // for example, you might want to remove it from here.
+ *   inputExcludes: ["android/**", "ios/**"],
+ *
+ *   // override which node gets called and with what additional arguments
+ *   nodeExecutableAndArgs: ["node"],
+ *
+ *   // supply additional arguments to the packager
+ *   extraPackagerArgs: []
+ * ]
+ */
+
+project.ext.react = [
+    enableHermes: true,  // clean and rebuild if changing
+]
+
+apply from: "../../node_modules/react-native/react.gradle"
+
+/**
+ * Set this to true to create two separate APKs instead of one:
+ *   - An APK that only works on ARM devices
+ *   - An APK that only works on x86 devices
+ * The advantage is the size of the APK is reduced by about 4MB.
+ * Upload all the APKs to the Play Store and people will download
+ * the correct one based on the CPU architecture of their device.
+ */
+def enableSeparateBuildPerCPUArchitecture = false
+
+/**
+ * Run Proguard to shrink the Java bytecode in release builds.
+ */
+def enableProguardInReleaseBuilds = false
+
+/**
+ * The preferred build flavor of JavaScriptCore.
+ *
+ * For example, to use the international variant, you can use:
+ * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
+ *
+ * The international variant includes ICU i18n library and necessary data
+ * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
+ * give correct results when using with locales other than en-US.  Note that
+ * this variant is about 6MiB larger per architecture than default.
+ */
+def jscFlavor = 'org.webkit:android-jsc:+'
+
+/**
+ * Whether to enable the Hermes VM.
+ *
+ * This should be set on project.ext.react and that value will be read here. If it is not set
+ * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
+ * and the benefits of using Hermes will therefore be sharply reduced.
+ */
+def enableHermes = project.ext.react.get("enableHermes", false);
+
+/**
+ * Architectures to build native code for.
+ */
+def reactNativeArchitectures() {
+    def value = project.getProperties().get("reactNativeArchitectures")
+    return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
+}
+
+android {
+    ndkVersion rootProject.ext.ndkVersion
+
+    compileSdkVersion rootProject.ext.compileSdkVersion
+
+    defaultConfig {
+        applicationId "com.aitron"
+        minSdkVersion rootProject.ext.minSdkVersion
+        targetSdkVersion rootProject.ext.targetSdkVersion
+        versionCode 1
+        versionName "1.0"
+        buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
+        missingDimensionStrategy 'react-native-camera', 'general' 
+
+        if (isNewArchitectureEnabled()) {
+            // We configure the CMake build only if you decide to opt-in for the New Architecture.
+            externalNativeBuild {
+                cmake {
+                    arguments "-DPROJECT_BUILD_DIR=$buildDir",
+                        "-DREACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
+                        "-DREACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build",
+                        "-DNODE_MODULES_DIR=$rootDir/../node_modules",
+                        "-DANDROID_STL=c++_shared"
+                }
+            }
+            if (!enableSeparateBuildPerCPUArchitecture) {
+                ndk {
+                    abiFilters (*reactNativeArchitectures())
+                }
+            }
+        }
+    }
+
+    if (isNewArchitectureEnabled()) {
+        // We configure the NDK build only if you decide to opt-in for the New Architecture.
+        externalNativeBuild {
+            cmake {
+                path "$projectDir/src/main/jni/CMakeLists.txt"
+            }
+        }
+        def reactAndroidProjectDir = project(':ReactAndroid').projectDir
+        def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) {
+            dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck")
+            from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
+            into("$buildDir/react-ndk/exported")
+        }
+        def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) {
+            dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck")
+            from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
+            into("$buildDir/react-ndk/exported")
+        }
+        afterEvaluate {
+            // If you wish to add a custom TurboModule or component locally,
+            // you should uncomment this line.
+            // preBuild.dependsOn("generateCodegenArtifactsFromSchema")
+            preDebugBuild.dependsOn(packageReactNdkDebugLibs)
+            preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)
+
+            // Due to a bug inside AGP, we have to explicitly set a dependency
+            // between configureCMakeDebug* tasks and the preBuild tasks.
+            // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
+            configureCMakeRelWithDebInfo.dependsOn(preReleaseBuild)
+            configureCMakeDebug.dependsOn(preDebugBuild)
+            reactNativeArchitectures().each { architecture ->
+                tasks.findByName("configureCMakeDebug[${architecture}]")?.configure {
+                    dependsOn("preDebugBuild")
+                }
+                tasks.findByName("configureCMakeRelWithDebInfo[${architecture}]")?.configure {
+                    dependsOn("preReleaseBuild")
+                }
+            }
+        }
+    }
+
+    splits {
+        abi {
+            reset()
+            enable enableSeparateBuildPerCPUArchitecture
+            universalApk false  // If true, also generate a universal APK
+            include (*reactNativeArchitectures())
+        }
+    }
+    signingConfigs {
+        debug {
+            storeFile file('debug.keystore')
+            storePassword 'android'
+            keyAlias 'androiddebugkey'
+            keyPassword 'android'
+        }
+    }
+    buildTypes {
+        debug {
+            signingConfig signingConfigs.debug
+        }
+        release {
+            // Caution! In production, you need to generate your own keystore file.
+            // see https://reactnative.dev/docs/signed-apk-android.
+            signingConfig signingConfigs.debug
+            minifyEnabled enableProguardInReleaseBuilds
+            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
+        }
+    }
+
+    // applicationVariants are e.g. debug, release
+    applicationVariants.all { variant ->
+        variant.outputs.each { output ->
+            // For each separate APK per architecture, set a unique version code as described here:
+            // https://developer.android.com/studio/build/configure-apk-splits.html
+            // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
+            def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
+            def abi = output.getFilter(OutputFile.ABI)
+            if (abi != null) {  // null for the universal-debug, universal-release variants
+                output.versionCodeOverride =
+                        defaultConfig.versionCode * 1000 + versionCodes.get(abi)
+            }
+
+        }
+    }
+}
+
+dependencies {
+    implementation fileTree(dir: "libs", include: ["*.jar"])
+
+    //noinspection GradleDynamicVersion
+    implementation "com.facebook.react:react-native:+"  // From node_modules
+
+    implementation project(':react-native-pure-jwt')
+
+     implementation project(':react-native-restart')
+
+    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
+
+    implementation project(':react-native-fs')
+
+    debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
+        exclude group:'com.facebook.fbjni'
+    }
+
+    
+    debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
+        exclude group:'com.facebook.flipper'
+        exclude group:'com.squareup.okhttp3', module:'okhttp'
+    }
+
+    debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
+        exclude group:'com.facebook.flipper'
+    }
+
+    if (enableHermes) {
+        //noinspection GradleDynamicVersion
+        implementation("com.facebook.react:hermes-engine:+") { // From node_modules
+            exclude group:'com.facebook.fbjni'
+        }
+    } else {
+        implementation jscFlavor
+    }
+}
+
+if (isNewArchitectureEnabled()) {
+    // If new architecture is enabled, we let you build RN from source
+    // Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
+    // This will be applied to all the imported transtitive dependency.
+    configurations.all {
+        resolutionStrategy.dependencySubstitution {
+            substitute(module("com.facebook.react:react-native"))
+                    .using(project(":ReactAndroid"))
+                    .because("On New Architecture we're building React Native from source")
+            substitute(module("com.facebook.react:hermes-engine"))
+                    .using(project(":ReactAndroid:hermes-engine"))
+                    .because("On New Architecture we're building Hermes from source")
+        }
+    }
+}
+
+// Run this once to be able to run the application with BUCK
+// puts all compile dependencies into folder libs for BUCK to use
+task copyDownloadableDepsToLibs(type: Copy) {
+    from configurations.implementation
+    into 'libs'
+}
+
+apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
+
+def isNewArchitectureEnabled() {
+    // To opt-in for the New Architecture, you can either:
+    // - Set `newArchEnabled` to true inside the `gradle.properties` file
+    // - Invoke gradle with `-newArchEnabled=true`
+    // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
+    return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
+}
 
android/app/build_defs.bzl (added)
+++ android/app/build_defs.bzl
@@ -0,0 +1,19 @@
+"""Helper definitions to glob .aar and .jar targets"""
+
+def create_aar_targets(aarfiles):
+    for aarfile in aarfiles:
+        name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
+        lib_deps.append(":" + name)
+        android_prebuilt_aar(
+            name = name,
+            aar = aarfile,
+        )
+
+def create_jar_targets(jarfiles):
+    for jarfile in jarfiles:
+        name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
+        lib_deps.append(":" + name)
+        prebuilt_jar(
+            name = name,
+            binary_jar = jarfile,
+        )
 
android/app/debug.keystore (Binary) (added)
+++ android/app/debug.keystore
Binary file is not shown
 
android/app/proguard-rules.pro (added)
+++ android/app/proguard-rules.pro
@@ -0,0 +1,10 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
 
android/app/src/debug/AndroidManifest.xml (added)
+++ android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools">
+  
+    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
+    <uses-permission android:name="android.permission.CAMERA" />
+        <!-- android:usesCleartextTraffic="true" -->
+    <application
+        tools:targetApi="28"
+        tools:ignore="GoogleAppIndexingWarning">
+        <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
+    </application>
+</manifest>
 
android/app/src/debug/java/com/trafficagent2/ReactNativeFlipper.java (added)
+++ android/app/src/debug/java/com/trafficagent2/ReactNativeFlipper.java
@@ -0,0 +1,73 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * <p>This source code is licensed under the MIT license found in the LICENSE file in the root
+ * directory of this source tree.
+ */
+package com.aitron;
+
+import android.content.Context;
+import com.facebook.flipper.android.AndroidFlipperClient;
+import com.facebook.flipper.android.utils.FlipperUtils;
+import com.facebook.flipper.core.FlipperClient;
+import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
+import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
+import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
+import com.facebook.flipper.plugins.inspector.DescriptorMapping;
+import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
+import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
+import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
+import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
+import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
+import com.facebook.react.ReactInstanceEventListener;
+import com.facebook.react.ReactInstanceManager;
+import com.facebook.react.bridge.ReactContext;
+import com.facebook.react.modules.network.NetworkingModule;
+import okhttp3.OkHttpClient;
+
+public class ReactNativeFlipper {
+  public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
+    if (FlipperUtils.shouldEnableFlipper(context)) {
+      final FlipperClient client = AndroidFlipperClient.getInstance(context);
+
+      client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
+      client.addPlugin(new ReactFlipperPlugin());
+      client.addPlugin(new DatabasesFlipperPlugin(context));
+      client.addPlugin(new SharedPreferencesFlipperPlugin(context));
+      client.addPlugin(CrashReporterPlugin.getInstance());
+
+      NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
+      NetworkingModule.setCustomClientBuilder(
+          new NetworkingModule.CustomClientBuilder() {
+            @Override
+            public void apply(OkHttpClient.Builder builder) {
+             // builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
+            }
+          });
+      client.addPlugin(networkFlipperPlugin);
+      client.start();
+
+      // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
+      // Hence we run if after all native modules have been initialized
+      ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
+      if (reactContext == null) {
+        reactInstanceManager.addReactInstanceEventListener(
+            new ReactInstanceEventListener() {
+              @Override
+              public void onReactContextInitialized(ReactContext reactContext) {
+                reactInstanceManager.removeReactInstanceEventListener(this);
+                reactContext.runOnNativeModulesQueueThread(
+                    new Runnable() {
+                      @Override
+                      public void run() {
+                        client.addPlugin(new FrescoFlipperPlugin());
+                      }
+                    });
+              }
+            });
+      } else {
+        client.addPlugin(new FrescoFlipperPlugin());
+      }
+    }
+  }
+}
 
android/app/src/main/AndroidManifest.xml (added)
+++ android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,41 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+  package="com.aitron">
+
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
+    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
+    <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
+    <uses-permission android:name="android.permission.CAMERA" />
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
+
+    <application
+      android:name=".MainApplication"
+      android:label="@string/app_name"
+      android:icon="@mipmap/ic_launcher"
+      android:roundIcon="@mipmap/ic_launcher_round"
+      android:allowBackup="false"
+      android:usesCleartextTraffic="true"
+      android.networkSecurityConfig="@xml/network_security_config"
+      android:theme="@style/AppTheme">
+      <meta-data
+        android:name="com.google.android.geo.API_KEY"
+        android:value="AIzaSyASJSJyYRgXN-z1_6aWMtpiaSvP8PdZ4DE"/>
+
+<!-- You will also only need to add this uses-libray tag -->
+<uses-library android:name="org.apache.http.legacy" android:required="false"/>
+      <activity
+        android:name=".MainActivity"
+        android:label="@string/app_name"
+        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
+        android:launchMode="singleTask"
+        android:windowSoftInputMode="adjustResize"
+        android:exported="true">
+        <intent-filter>
+            <action android:name="android.intent.action.MAIN" />
+            <category android:name="android.intent.category.LAUNCHER" />
+        </intent-filter>
+      </activity>
+    </application>
+</manifest>
 
android/app/src/main/assets/index.android.bundle (added)
+++ android/app/src/main/assets/index.android.bundle
This file is too big to display.
 
android/app/src/main/java/com/aitron/MainActivity.java (added)
+++ android/app/src/main/java/com/aitron/MainActivity.java
This diff is skipped because there are too many other diffs.
 
android/app/src/main/java/com/aitron/MainApplication.java (added)
+++ android/app/src/main/java/com/aitron/MainApplication.java
This diff is skipped because there are too many other diffs.
 
android/app/src/main/java/com/aitron/newarchitecture/MainApplicationReactNativeHost.java (added)
+++ android/app/src/main/java/com/aitron/newarchitecture/MainApplicationReactNativeHost.java
This diff is skipped because there are too many other diffs.
 
android/app/src/main/java/com/aitron/newarchitecture/components/MainComponentsRegistry.java (added)
+++ android/app/src/main/java/com/aitron/newarchitecture/components/MainComponentsRegistry.java
This diff is skipped because there are too many other diffs.
 
android/app/src/main/java/com/aitron/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java (added)
+++ android/app/src/main/java/com/aitron/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java
This diff is skipped because there are too many other diffs.
 
android/app/src/main/jni/CMakeLists.txt (added)
+++ android/app/src/main/jni/CMakeLists.txt
This diff is skipped because there are too many other diffs.
 
android/app/src/main/jni/MainApplicationModuleProvider.cpp (added)
+++ android/app/src/main/jni/MainApplicationModuleProvider.cpp
This diff is skipped because there are too many other diffs.
 
android/app/src/main/jni/MainApplicationModuleProvider.h (added)
+++ android/app/src/main/jni/MainApplicationModuleProvider.h
This diff is skipped because there are too many other diffs.
 
android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp (added)
+++ android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp
This diff is skipped because there are too many other diffs.
 
android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h (added)
+++ android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h
This diff is skipped because there are too many other diffs.
 
android/app/src/main/jni/MainComponentsRegistry.cpp (added)
+++ android/app/src/main/jni/MainComponentsRegistry.cpp
This diff is skipped because there are too many other diffs.
 
android/app/src/main/jni/MainComponentsRegistry.h (added)
+++ android/app/src/main/jni/MainComponentsRegistry.h
This diff is skipped because there are too many other diffs.
 
android/app/src/main/jni/OnLoad.cpp (added)
+++ android/app/src/main/jni/OnLoad.cpp
This diff is skipped because there are too many other diffs.
 
android/app/src/main/res/drawable-hdpi/node_modules_reactnavigation_drawer_src_views_assets_toggledrawericon.png (Binary) (added)
+++ android/app/src/main/res/drawable-hdpi/node_modules_reactnavigation_drawer_src_views_assets_toggledrawericon.png
Binary file is not shown
 
android/app/src/main/res/drawable-hdpi/node_modules_reactnavigation_elements_src_assets_backicon.png (Binary) (added)
+++ android/app/src/main/res/drawable-hdpi/node_modules_reactnavigation_elements_src_assets_backicon.png
Binary file is not shown
 
android/app/src/main/res/drawable-mdpi/node_modules_reactnativepaper_src_assets_backchevron.png (Binary) (added)
+++ android/app/src/main/res/drawable-mdpi/node_modules_reactnativepaper_src_assets_backchevron.png
Binary file is not shown
 
android/app/src/main/res/drawable-mdpi/node_modules_reactnavigation_drawer_src_views_assets_toggledrawericon.png (Binary) (added)
+++ android/app/src/main/res/drawable-mdpi/node_modules_reactnavigation_drawer_src_views_assets_toggledrawericon.png
Binary file is not shown
 
android/app/src/main/res/drawable-mdpi/node_modules_reactnavigation_elements_src_assets_backicon.png (Binary) (added)
+++ android/app/src/main/res/drawable-mdpi/node_modules_reactnavigation_elements_src_assets_backicon.png
Binary file is not shown
 
android/app/src/main/res/drawable-mdpi/node_modules_reactnavigation_elements_src_assets_backiconmask.png (Binary) (added)
+++ android/app/src/main/res/drawable-mdpi/node_modules_reactnavigation_elements_src_assets_backiconmask.png
Binary file is not shown
 
android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_current_location.png (Binary) (added)
+++ android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_current_location.png
Binary file is not shown
 
android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_end_point.png (Binary) (added)
+++ android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_end_point.png
Binary file is not shown
 
android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_fog_marker.png (Binary) (added)
+++ android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_fog_marker.png
Binary file is not shown
 
android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_frsg_loading.jpg (Binary) (added)
+++ android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_frsg_loading.jpg
Binary file is not shown
 
android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_map.jpg (Binary) (added)
+++ android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_map.jpg
Binary file is not shown
 
android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_map2.jpg (Binary) (added)
+++ android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_map2.jpg
Binary file is not shown
 
android/app/src/main/res/drawable-xhdpi/node_modules_reactnavigation_drawer_src_views_assets_toggledrawericon.png (Binary) (added)
+++ android/app/src/main/res/drawable-xhdpi/node_modules_reactnavigation_drawer_src_views_assets_toggledrawericon.png
Binary file is not shown
 
android/app/src/main/res/drawable-xhdpi/node_modules_reactnavigation_elements_src_assets_backicon.png (Binary) (added)
+++ android/app/src/main/res/drawable-xhdpi/node_modules_reactnavigation_elements_src_assets_backicon.png
Binary file is not shown
 
android/app/src/main/res/drawable-xxhdpi/node_modules_reactnavigation_drawer_src_views_assets_toggledrawericon.png (Binary) (added)
+++ android/app/src/main/res/drawable-xxhdpi/node_modules_reactnavigation_drawer_src_views_assets_toggledrawericon.png
Binary file is not shown
 
android/app/src/main/res/drawable-xxhdpi/node_modules_reactnavigation_elements_src_assets_backicon.png (Binary) (added)
+++ android/app/src/main/res/drawable-xxhdpi/node_modules_reactnavigation_elements_src_assets_backicon.png
Binary file is not shown
 
android/app/src/main/res/drawable-xxxhdpi/node_modules_reactnavigation_drawer_src_views_assets_toggledrawericon.png (Binary) (added)
+++ android/app/src/main/res/drawable-xxxhdpi/node_modules_reactnavigation_drawer_src_views_assets_toggledrawericon.png
Binary file is not shown
 
android/app/src/main/res/drawable-xxxhdpi/node_modules_reactnavigation_elements_src_assets_backicon.png (Binary) (added)
+++ android/app/src/main/res/drawable-xxxhdpi/node_modules_reactnavigation_elements_src_assets_backicon.png
Binary file is not shown
 
android/app/src/main/res/drawable/rn_edit_text_material.xml (added)
+++ android/app/src/main/res/drawable/rn_edit_text_material.xml
This diff is skipped because there are too many other diffs.
 
android/app/src/main/res/mipmap-hdpi/ic_launcher.png (Binary) (added)
+++ android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Binary file is not shown
 
android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png (Binary) (added)
+++ android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Binary file is not shown
 
android/app/src/main/res/mipmap-mdpi/ic_launcher.png (Binary) (added)
+++ android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Binary file is not shown
 
android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png (Binary) (added)
+++ android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Binary file is not shown
 
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png (Binary) (added)
+++ android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary file is not shown
 
android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png (Binary) (added)
+++ android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Binary file is not shown
 
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (Binary) (added)
+++ android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary file is not shown
 
android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png (Binary) (added)
+++ android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Binary file is not shown
 
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png (Binary) (added)
+++ android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary file is not shown
 
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png (Binary) (added)
+++ android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Binary file is not shown
 
android/app/src/main/res/values/strings.xml (added)
+++ android/app/src/main/res/values/strings.xml
This diff is skipped because there are too many other diffs.
 
android/app/src/main/res/values/styles.xml (added)
+++ android/app/src/main/res/values/styles.xml
This diff is skipped because there are too many other diffs.
 
android/app/src/main/res/xml/network_security_config.xml (added)
+++ android/app/src/main/res/xml/network_security_config.xml
This diff is skipped because there are too many other diffs.
 
android/build.gradle (added)
+++ android/build.gradle
This diff is skipped because there are too many other diffs.
 
android/gradle.properties (added)
+++ android/gradle.properties
This diff is skipped because there are too many other diffs.
 
android/gradle/wrapper/gradle-wrapper.jar (Binary) (added)
+++ android/gradle/wrapper/gradle-wrapper.jar
Binary file is not shown
 
android/gradle/wrapper/gradle-wrapper.properties (added)
+++ android/gradle/wrapper/gradle-wrapper.properties
This diff is skipped because there are too many other diffs.
 
android/gradlew (added)
+++ android/gradlew
This diff is skipped because there are too many other diffs.
 
android/gradlew.bat (added)
+++ android/gradlew.bat
This diff is skipped because there are too many other diffs.
 
android/settings.gradle (added)
+++ android/settings.gradle
This diff is skipped because there are too many other diffs.
 
app.json (added)
+++ app.json
This diff is skipped because there are too many other diffs.
 
babel.config.js (added)
+++ babel.config.js
This diff is skipped because there are too many other diffs.
 
index.js (added)
+++ index.js
This diff is skipped because there are too many other diffs.
 
ios/.xcode.env (added)
+++ ios/.xcode.env
This diff is skipped because there are too many other diffs.
 
ios/Podfile (added)
+++ ios/Podfile
This diff is skipped because there are too many other diffs.
 
ios/TrafficAgent2.xcodeproj/project.pbxproj (added)
+++ ios/TrafficAgent2.xcodeproj/project.pbxproj
This diff is skipped because there are too many other diffs.
 
ios/TrafficAgent2.xcodeproj/xcshareddata/xcschemes/TrafficAgent2.xcscheme (added)
+++ ios/TrafficAgent2.xcodeproj/xcshareddata/xcschemes/TrafficAgent2.xcscheme
This diff is skipped because there are too many other diffs.
 
ios/TrafficAgent2/AppDelegate.h (added)
+++ ios/TrafficAgent2/AppDelegate.h
This diff is skipped because there are too many other diffs.
 
ios/TrafficAgent2/AppDelegate.mm (added)
+++ ios/TrafficAgent2/AppDelegate.mm
This diff is skipped because there are too many other diffs.
 
ios/TrafficAgent2/Images.xcassets/AppIcon.appiconset/Contents.json (added)
+++ ios/TrafficAgent2/Images.xcassets/AppIcon.appiconset/Contents.json
This diff is skipped because there are too many other diffs.
 
ios/TrafficAgent2/Images.xcassets/Contents.json (added)
+++ ios/TrafficAgent2/Images.xcassets/Contents.json
This diff is skipped because there are too many other diffs.
 
ios/TrafficAgent2/Info.plist (added)
+++ ios/TrafficAgent2/Info.plist
This diff is skipped because there are too many other diffs.
 
ios/TrafficAgent2/LaunchScreen.storyboard (added)
+++ ios/TrafficAgent2/LaunchScreen.storyboard
This diff is skipped because there are too many other diffs.
 
ios/TrafficAgent2/main.m (added)
+++ ios/TrafficAgent2/main.m
This diff is skipped because there are too many other diffs.
 
ios/TrafficAgent2Tests/Info.plist (added)
+++ ios/TrafficAgent2Tests/Info.plist
This diff is skipped because there are too many other diffs.
 
ios/TrafficAgent2Tests/TrafficAgent2Tests.m (added)
+++ ios/TrafficAgent2Tests/TrafficAgent2Tests.m
This diff is skipped because there are too many other diffs.
 
metro.config.js (added)
+++ metro.config.js
This diff is skipped because there are too many other diffs.
 
package-lock.json (added)
+++ package-lock.json
This diff is skipped because there are too many other diffs.
 
package.json (added)
+++ package.json
This diff is skipped because there are too many other diffs.
 
src/component/Action.js (added)
+++ src/component/Action.js
This diff is skipped because there are too many other diffs.
 
src/component/BottomDrop.js (added)
+++ src/component/BottomDrop.js
This diff is skipped because there are too many other diffs.
 
src/component/Button.js (added)
+++ src/component/Button.js
This diff is skipped because there are too many other diffs.
 
src/component/Checkbox.js (added)
+++ src/component/Checkbox.js
This diff is skipped because there are too many other diffs.
 
src/component/CustomDrawer.js (added)
+++ src/component/CustomDrawer.js
This diff is skipped because there are too many other diffs.
 
src/component/DriveStatus.js (added)
+++ src/component/DriveStatus.js
This diff is skipped because there are too many other diffs.
 
src/component/Input.js (added)
+++ src/component/Input.js
This diff is skipped because there are too many other diffs.
 
src/component/Logo.js (added)
+++ src/component/Logo.js
This diff is skipped because there are too many other diffs.
 
src/component/Map.js (added)
+++ src/component/Map.js
This diff is skipped because there are too many other diffs.
 
src/component/Photo.js (added)
+++ src/component/Photo.js
This diff is skipped because there are too many other diffs.
 
src/context/AuthContext.js (added)
+++ src/context/AuthContext.js
This diff is skipped because there are too many other diffs.
 
src/context/MapContext.js (added)
+++ src/context/MapContext.js
This diff is skipped because there are too many other diffs.
 
src/navigator/AppNav.js (added)
+++ src/navigator/AppNav.js
This diff is skipped because there are too many other diffs.
 
src/navigator/AppStack.js (added)
+++ src/navigator/AppStack.js
This diff is skipped because there are too many other diffs.
 
src/navigator/AuthStack.js (added)
+++ src/navigator/AuthStack.js
This diff is skipped because there are too many other diffs.
 
src/navigator/DrawerNavigate.js (added)
+++ src/navigator/DrawerNavigate.js
This diff is skipped because there are too many other diffs.
 
src/resoureces/files/images/css_loading.jpg (Binary) (added)
+++ src/resoureces/files/images/css_loading.jpg
Binary file is not shown
 
src/resoureces/files/images/current_location.png (Binary) (added)
+++ src/resoureces/files/images/current_location.png
Binary file is not shown
 
src/resoureces/files/images/end_point.png (Binary) (added)
+++ src/resoureces/files/images/end_point.png
Binary file is not shown
 
src/resoureces/files/images/fog_marker.png (Binary) (added)
+++ src/resoureces/files/images/fog_marker.png
Binary file is not shown
 
src/resoureces/files/images/frsg_loading.png (Binary) (added)
+++ src/resoureces/files/images/frsg_loading.png
Binary file is not shown
 
src/resoureces/files/images/frsg_loading_1.jpg (Binary) (added)
+++ src/resoureces/files/images/frsg_loading_1.jpg
Binary file is not shown
 
src/resoureces/files/images/login_logo_1.png (Binary) (added)
+++ src/resoureces/files/images/login_logo_1.png
Binary file is not shown
 
src/resoureces/files/images/login_logo_2.png (Binary) (added)
+++ src/resoureces/files/images/login_logo_2.png
Binary file is not shown
 
src/resoureces/files/images/splash_logo_1.png (Binary) (added)
+++ src/resoureces/files/images/splash_logo_1.png
Binary file is not shown
 
src/resoureces/files/images/splash_logo_2.png (Binary) (added)
+++ src/resoureces/files/images/splash_logo_2.png
Binary file is not shown
 
src/resoureces/styles/GlobalStyles.js (added)
+++ src/resoureces/styles/GlobalStyles.js
This diff is skipped because there are too many other diffs.
 
src/screens/Login.js (added)
+++ src/screens/Login.js
This diff is skipped because there are too many other diffs.
 
src/screens/Main.js (added)
+++ src/screens/Main.js
This diff is skipped because there are too many other diffs.
 
src/screens/Rain.js (added)
+++ src/screens/Rain.js
This diff is skipped because there are too many other diffs.
 
src/screens/Setting.js (added)
+++ src/screens/Setting.js
This diff is skipped because there are too many other diffs.
 
src/screens/StartLoading.js (added)
+++ src/screens/StartLoading.js
This diff is skipped because there are too many other diffs.
 
src/screens/UserInformation.js (added)
+++ src/screens/UserInformation.js
This diff is skipped because there are too many other diffs.
 
test.json (added)
+++ test.json
This diff is skipped because there are too many other diffs.
Add a comment
List