Parcourir la source

初始化项目

wushaodong il y a 4 ans
commit
be0eaf3298
100 fichiers modifiés avec 790 ajouts et 0 suppressions
  1. 10 0
      .babelrc
  2. 6 0
      .buckconfig
  3. 70 0
      .flowconfig
  4. 1 0
      .gitattributes
  5. 58 0
      .gitignore
  6. 1 0
      .watchmanconfig
  7. 1 0
      android.bat
  8. 17 0
      android/.project
  9. 2 0
      android/.settings/org.eclipse.buildship.core.prefs
  10. 6 0
      android/app/.classpath
  11. 23 0
      android/app/.project
  12. 2 0
      android/app/.settings/org.eclipse.buildship.core.prefs
  13. 55 0
      android/app/_BUCK
  14. 233 0
      android/app/build.gradle
  15. 19 0
      android/app/build_defs.bzl
  16. 23 0
      android/app/gradle.properties
  17. BIN
      android/app/libs/DocumentPicker.aar
  18. BIN
      android/app/libs/IGLBarDecoder.jar
  19. BIN
      android/app/libs/alipaySdk-15.6.8-20191021122514.aar
  20. BIN
      android/app/libs/cw-deviceapi20191022.jar
  21. BIN
      android/app/libs/jxl.jar
  22. BIN
      android/app/libs/xUtils-2.5.5.jar
  23. 37 0
      android/app/proguard-rules.pro
  24. BIN
      android/app/release/gfps.apk
  25. 1 0
      android/app/release/output.json
  26. 8 0
      android/app/src/debug/AndroidManifest.xml
  27. 37 0
      android/app/src/main/AndroidManifest.xml
  28. BIN
      android/app/src/main/assets/fonts/AntDesign.ttf
  29. BIN
      android/app/src/main/assets/fonts/Entypo.ttf
  30. BIN
      android/app/src/main/assets/fonts/EvilIcons.ttf
  31. BIN
      android/app/src/main/assets/fonts/Feather.ttf
  32. BIN
      android/app/src/main/assets/fonts/FontAwesome.otf
  33. BIN
      android/app/src/main/assets/fonts/FontAwesome.ttf
  34. BIN
      android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf
  35. BIN
      android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf
  36. BIN
      android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf
  37. BIN
      android/app/src/main/assets/fonts/Fontisto.ttf
  38. BIN
      android/app/src/main/assets/fonts/Foundation.ttf
  39. BIN
      android/app/src/main/assets/fonts/Ionicons.ttf
  40. BIN
      android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf
  41. BIN
      android/app/src/main/assets/fonts/MaterialIcons.ttf
  42. BIN
      android/app/src/main/assets/fonts/Octicons.ttf
  43. BIN
      android/app/src/main/assets/fonts/SimpleLineIcons.ttf
  44. BIN
      android/app/src/main/assets/fonts/Zocial.ttf
  45. BIN
      android/app/src/main/assets/fonts/antfill.ttf
  46. BIN
      android/app/src/main/assets/fonts/antoutline.ttf
  47. BIN
      android/app/src/main/assets/fonts/fontawesome-webfont.ttf
  48. BIN
      android/app/src/main/assets/fonts/iconfont.ttf
  49. BIN
      android/app/src/main/jniLibs/arm64-v8a/libDeviceAPI.so
  50. BIN
      android/app/src/main/jniLibs/arm64-v8a/libHHPScanInterface.so
  51. BIN
      android/app/src/main/jniLibs/arm64-v8a/libHSMDecoderAPI.so
  52. BIN
      android/app/src/main/jniLibs/arm64-v8a/libHsmKil.so
  53. BIN
      android/app/src/main/jniLibs/arm64-v8a/libIAL.so
  54. BIN
      android/app/src/main/jniLibs/arm64-v8a/libIGLBarDecoder.so
  55. BIN
      android/app/src/main/jniLibs/arm64-v8a/libIGLImageAE.so
  56. BIN
      android/app/src/main/jniLibs/arm64-v8a/libSDL.so
  57. BIN
      android/app/src/main/jniLibs/arm64-v8a/libbarcodereader44.so
  58. BIN
      android/app/src/main/jniLibs/armeabi-v7a/libDeviceAPI.so
  59. BIN
      android/app/src/main/jniLibs/armeabi-v7a/libHHPScanInterface.so
  60. BIN
      android/app/src/main/jniLibs/armeabi-v7a/libHSMDecoderAPI.so
  61. BIN
      android/app/src/main/jniLibs/armeabi-v7a/libHsmKil.so
  62. BIN
      android/app/src/main/jniLibs/armeabi-v7a/libIAL.so
  63. BIN
      android/app/src/main/jniLibs/armeabi-v7a/libIGLBarDecoder.so
  64. BIN
      android/app/src/main/jniLibs/armeabi-v7a/libIGLImageAE.so
  65. BIN
      android/app/src/main/jniLibs/armeabi-v7a/libSDL.so
  66. BIN
      android/app/src/main/jniLibs/armeabi-v7a/libbarcodereader.so
  67. BIN
      android/app/src/main/jniLibs/armeabi-v7a/libbarcodereader43.so
  68. BIN
      android/app/src/main/jniLibs/armeabi-v7a/libbarcodereader44.so
  69. BIN
      android/app/src/main/jniLibs/armeabi/libDeviceAPI.so
  70. BIN
      android/app/src/main/jniLibs/armeabi/libHHPScanInterface.so
  71. BIN
      android/app/src/main/jniLibs/armeabi/libHSMDecoderAPI.so
  72. BIN
      android/app/src/main/jniLibs/armeabi/libHsmKil.so
  73. BIN
      android/app/src/main/jniLibs/armeabi/libIAL.so
  74. BIN
      android/app/src/main/jniLibs/armeabi/libIGLBarDecoder.so
  75. BIN
      android/app/src/main/jniLibs/armeabi/libIGLImageAE.so
  76. BIN
      android/app/src/main/jniLibs/armeabi/libSDL.so
  77. BIN
      android/app/src/main/jniLibs/armeabi/libbarcodereader.so
  78. BIN
      android/app/src/main/jniLibs/armeabi/libbarcodereader43.so
  79. BIN
      android/app/src/main/jniLibs/armeabi/libbarcodereader44.so
  80. BIN
      android/app/src/main/res/drawable-hdpi/ic_launcher.png
  81. BIN
      android/app/src/main/res/drawable-xxhdpi/ic_launcher.png
  82. BIN
      android/app/src/main/res/drawable-xxxhdpi/ic_launcher.png
  83. 12 0
      android/app/src/main/res/drawable/countdown_days.xml
  84. BIN
      android/app/src/main/res/drawable/ic_back.png
  85. 8 0
      android/app/src/main/res/layout/activity_jump.xml
  86. 6 0
      android/app/src/main/res/layout/activity_live.xml
  87. 8 0
      android/app/src/main/res/layout/activity_push.xml
  88. 62 0
      android/app/src/main/res/layout/notification_countdown.xml
  89. BIN
      android/app/src/main/res/mipmap-hdpi/ic_back.png
  90. BIN
      android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  91. BIN
      android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  92. BIN
      android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  93. BIN
      android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  94. BIN
      android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  95. BIN
      android/app/src/main/res/raw/barcodebeep.ogg
  96. BIN
      android/app/src/main/res/raw/serror.ogg
  97. 15 0
      android/app/src/main/res/values/colors.xml
  98. 4 0
      android/app/src/main/res/values/strings.xml
  99. 20 0
      android/app/src/main/res/values/styles.xml
  100. 45 0
      android/build.gradle

+ 10 - 0
.babelrc

@@ -0,0 +1,10 @@
+{
+    "presets": ["module:metro-react-native-babel-preset"],
+    "env": {
+        "production": {
+        }
+    },
+    "plugins": [
+        ["@babel/plugin-proposal-decorators", { "legacy": true }]
+    ]
+}

+ 6 - 0
.buckconfig

@@ -0,0 +1,6 @@
+
+[android]
+  target = Google Inc.:Google APIs:23
+
+[maven_repositories]
+  central = https://repo1.maven.org/maven2

+ 70 - 0
.flowconfig

@@ -0,0 +1,70 @@
+[ignore]
+; We fork some components by platform
+.*/*[.]android.js
+
+; Ignore "BUCK" generated dirs
+<PROJECT_ROOT>/\.buckd/
+
+; Ignore unexpected extra "@providesModule"
+.*/node_modules/.*/node_modules/fbjs/.*
+
+; Ignore duplicate module providers
+; For RN Apps installed via npm, "Libraries" folder is inside
+; "node_modules/react-native" but in the source repo it is in the root
+.*/Libraries/react-native/React.js
+
+; Ignore polyfills
+.*/Libraries/polyfills/.*
+
+; Ignore metro
+.*/node_modules/metro/.*
+
+[include]
+
+[libs]
+node_modules/react-native/Libraries/react-native/react-native-interface.js
+node_modules/react-native/flow/
+node_modules/react-native/flow-github/
+
+[options]
+emoji=true
+
+esproposal.optional_chaining=enable
+esproposal.nullish_coalescing=enable
+
+module.system=haste
+module.system.haste.use_name_reducers=true
+# get basename
+module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
+# strip .js or .js.flow suffix
+module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
+# strip .ios suffix
+module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
+module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
+module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
+module.system.haste.paths.blacklist=.*/__tests__/.*
+module.system.haste.paths.blacklist=.*/__mocks__/.*
+module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
+module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
+
+munge_underscores=true
+
+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\)$' -> 'RelativeImageStub'
+
+module.file_ext=.js
+module.file_ext=.jsx
+module.file_ext=.json
+module.file_ext=.native.js
+
+suppress_type=$FlowIssue
+suppress_type=$FlowFixMe
+suppress_type=$FlowFixMeProps
+suppress_type=$FlowFixMeState
+
+suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
+suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
+suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
+suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
+
+[version]
+^0.78.0

+ 1 - 0
.gitattributes

@@ -0,0 +1 @@
+*.pbxproj -text

+ 58 - 0
.gitignore

@@ -0,0 +1,58 @@
+# 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
+project.xcworkspace
+
+# Android/IntelliJ
+#
+build/
+.idea
+.gradle
+local.properties
+*.iml
+
+# node.js
+#
+node_modules/
+npm-debug.log
+yarn-error.log
+
+# BUCK
+buck-out/
+\.buckd/
+*.keystore
+*.lock
+
+# 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
+
+# Bundle artifact
+*.jsbundle
+package-lock.json

+ 1 - 0
.watchmanconfig

@@ -0,0 +1 @@
+{}

+ 1 - 0
android.bat

@@ -0,0 +1 @@
+react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

+ 17 - 0
android/.project

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>power_sensor</name>
+	<comment>Project android created by Buildship.</comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
+	</natures>
+</projectDescription>

+ 2 - 0
android/.settings/org.eclipse.buildship.core.prefs

@@ -0,0 +1,2 @@
+connection.project.dir=
+eclipse.preferences.version=1

+ 6 - 0
android/app/.classpath

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
+	<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
+	<classpathentry kind="output" path="bin/default"/>
+</classpath>

+ 23 - 0
android/app/.project

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>app</name>
+	<comment>Project app created by Buildship.</comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
+	</natures>
+</projectDescription>

+ 2 - 0
android/app/.settings/org.eclipse.buildship.core.prefs

@@ -0,0 +1,2 @@
+connection.project.dir=..
+eclipse.preferences.version=1

+ 55 - 0
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.zzliaoyuan.power_sensor",
+)
+
+android_resource(
+    name = "res",
+    package = "com.zzliaoyuan.power_sensor",
+    res = "src/main/res",
+)
+
+android_binary(
+    name = "app",
+    keystore = "//android/keystores:debug",
+    manifest = "src/main/AndroidManifest.xml",
+    package_type = "debug",
+    deps = [
+        ":app-code",
+    ],
+)

+ 233 - 0
android/app/build.gradle

@@ -0,0 +1,233 @@
+apply plugin: "com.android.application"
+
+import com.android.build.OutputFile
+
+/**
+ * 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
+ *   entryFile: "index.android.js",
+ *
+ *   // https://facebook.github.io/react-native/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 = [
+    entryFile: "index.js",
+    enableHermes: false,  // 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 mirrored 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);
+
+android {
+    compileSdkVersion rootProject.ext.compileSdkVersion
+
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_8
+        targetCompatibility JavaVersion.VERSION_1_8
+    }
+
+    defaultConfig {
+        applicationId "com.zzliaoyuan.power_sensor"
+        minSdkVersion rootProject.ext.minSdkVersion
+        targetSdkVersion rootProject.ext.targetSdkVersion
+        versionCode 10
+        versionName "1.0.0"
+        multiDexEnabled true
+        // manifestPlaceholders = [
+        //        XG_ACCESS_ID : "2100348457",
+        //        XG_ACCESS_KEY: "A418SKXY4X8N",
+        //        qqappid : "101839333",
+        //        QQ_APPKEY: "830c5b1266259f7c8353e1f8e18beff7"
+       // ]
+        vectorDrawables.useSupportLibrary = true  //react-native-image-crop-picker
+    }
+    splits {
+        abi {
+            reset()
+            enable enableSeparateBuildPerCPUArchitecture
+            universalApk false  // If true, also generate a universal APK
+            include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
+        }
+    }
+    signingConfigs {
+        debug {
+            if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
+                storeFile file(MYAPP_RELEASE_STORE_FILE)
+                storePassword MYAPP_RELEASE_STORE_PASSWORD
+                keyAlias MYAPP_RELEASE_KEY_ALIAS
+                keyPassword MYAPP_RELEASE_KEY_PASSWORD
+            }
+        }
+        release {
+            if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
+                storeFile file(MYAPP_RELEASE_STORE_FILE)
+                storePassword MYAPP_RELEASE_STORE_PASSWORD
+                keyAlias MYAPP_RELEASE_KEY_ALIAS
+                keyPassword MYAPP_RELEASE_KEY_PASSWORD
+            }
+        }
+    }
+    buildToolsVersion = '28.0.3'
+    buildTypes {
+        debug {
+            signingConfig signingConfigs.debug
+        }
+        release {
+            // Caution! In production, you need to generate your own keystore file.
+            // see https://facebook.github.io/react-native/docs/signed-apk-android.
+            signingConfig signingConfigs.release
+            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
+            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 =
+                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
+            }
+
+        }
+    }
+}
+
+dependencies {
+    implementation project(':react-native-gesture-handler')
+    implementation fileTree(dir: "libs", include: ["*.jar"])
+    implementation "com.facebook.react:react-native:+"  // From node_modules
+    implementation 'com.android.support:multidex:1.0.3'
+
+    api 'com.github.dfqin:grantor:2.5'
+    // UHF
+    implementation files('libs/cw-deviceapi20191022.jar')
+
+    //jg包
+    implementation 'com.tencent.jg:jg:1.1'
+    //wup包
+    implementation 'com.tencent.wup:wup:1.0.0.E-Release'
+    //mid包,minSdkVersion 14
+    implementation 'com.tencent.mid:mid:4.0.7-Release'
+
+    if (enableHermes) {
+        def hermesPath = "../../node_modules/hermes-engine/android/";
+        debugImplementation files(hermesPath + "hermes-debug.aar")
+        releaseImplementation files(hermesPath + "hermes-release.aar")
+    } else {
+        implementation jscFlavor
+    }
+}
+
+// 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.compile
+    into 'libs'
+}
+
+apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

+ 19 - 0
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,
+        )

+ 23 - 0
android/app/gradle.properties

@@ -0,0 +1,23 @@
+# Project-wide Gradle settings.
+
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+# Default value: -Xmx10248m -XX:MaxPermSize=256m
+# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
+
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+
+MYAPP_RELEASE_STORE_FILE=../examwin.keystore
+MYAPP_RELEASE_KEY_ALIAS=examwin
+MYAPP_RELEASE_STORE_PASSWORD=zzly508
+MYAPP_RELEASE_KEY_PASSWORD=zzly508

BIN
android/app/libs/DocumentPicker.aar


BIN
android/app/libs/IGLBarDecoder.jar


BIN
android/app/libs/alipaySdk-15.6.8-20191021122514.aar


BIN
android/app/libs/cw-deviceapi20191022.jar


BIN
android/app/libs/jxl.jar


BIN
android/app/libs/xUtils-2.5.5.jar


+ 37 - 0
android/app/proguard-rules.pro

@@ -0,0 +1,37 @@
+# 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:
+
+-keep class com.alipay.android.app.IAlixPay{*;}
+-keep class com.alipay.android.app.IAlixPay$Stub{*;}
+-keep class com.alipay.android.app.IRemoteServiceCallback{*;}
+-keep class com.alipay.android.app.IRemoteServiceCallback$Stub{*;}
+-keep class com.alipay.sdk.app.PayTask{ public *;}
+-keep class com.alipay.sdk.app.AuthTask{ public *;}
+-keep class com.alipay.sdk.app.H5PayCallback {
+    <fields>;
+    <methods>;
+}
+-keep class com.alipay.android.phone.mrpc.core.** { *; }
+-keep class com.alipay.apmobilesecuritysdk.** { *; }
+-keep class com.alipay.mobile.framework.service.annotation.** { *; }
+-keep class com.alipay.mobilesecuritysdk.face.** { *; }
+-keep class com.alipay.tscenter.biz.rpc.** { *; }
+-keep class org.json.alipay.** { *; }
+-keep class com.alipay.tscenter.** { *; }
+-keep class com.ta.utdid2.** { *;}
+-keep class com.ut.device.** { *;}
+-keep class com.tencent.mm.sdk.** {
+  *;
+}
+-keep class com.umeng.** {*;}
+-dontwarn com.tencent.bugly.**
+-keep public class com.tencent.bugly.**{*;}
+-keep class android.support.**{*;}

BIN
android/app/release/gfps.apk


+ 1 - 0
android/app/release/output.json

@@ -0,0 +1 @@
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":20,"versionName":"2.0.1","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]

+ 8 - 0
android/app/src/debug/AndroidManifest.xml

@@ -0,0 +1,8 @@
+<?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"/>
+
+    <application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
+</manifest>

+ 37 - 0
android/app/src/main/AndroidManifest.xml

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    package="com.zzliaoyuan.power_sensor">
+
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
+    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
+    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
+
+    <application
+        android:name=".MainApplication"
+        android:icon="@mipmap/ic_launcher"
+        android:usesCleartextTraffic="true"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme">
+        <uses-library android:name="org.apache.http.legacy" android:required="false" />
+        <activity
+            android:name=".activity.MainActivity"
+            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+            android:label="@string/app_name"
+            android:windowSoftInputMode="adjustResize">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+
+        <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
+
+    </application>
+
+</manifest>

BIN
android/app/src/main/assets/fonts/AntDesign.ttf


BIN
android/app/src/main/assets/fonts/Entypo.ttf


BIN
android/app/src/main/assets/fonts/EvilIcons.ttf


BIN
android/app/src/main/assets/fonts/Feather.ttf


BIN
android/app/src/main/assets/fonts/FontAwesome.otf


BIN
android/app/src/main/assets/fonts/FontAwesome.ttf


BIN
android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf


BIN
android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf


BIN
android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf


BIN
android/app/src/main/assets/fonts/Fontisto.ttf


BIN
android/app/src/main/assets/fonts/Foundation.ttf


BIN
android/app/src/main/assets/fonts/Ionicons.ttf


BIN
android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf


BIN
android/app/src/main/assets/fonts/MaterialIcons.ttf


BIN
android/app/src/main/assets/fonts/Octicons.ttf


BIN
android/app/src/main/assets/fonts/SimpleLineIcons.ttf


BIN
android/app/src/main/assets/fonts/Zocial.ttf


BIN
android/app/src/main/assets/fonts/antfill.ttf


BIN
android/app/src/main/assets/fonts/antoutline.ttf


BIN
android/app/src/main/assets/fonts/fontawesome-webfont.ttf


BIN
android/app/src/main/assets/fonts/iconfont.ttf


BIN
android/app/src/main/jniLibs/arm64-v8a/libDeviceAPI.so


BIN
android/app/src/main/jniLibs/arm64-v8a/libHHPScanInterface.so


BIN
android/app/src/main/jniLibs/arm64-v8a/libHSMDecoderAPI.so


BIN
android/app/src/main/jniLibs/arm64-v8a/libHsmKil.so


BIN
android/app/src/main/jniLibs/arm64-v8a/libIAL.so


BIN
android/app/src/main/jniLibs/arm64-v8a/libIGLBarDecoder.so


BIN
android/app/src/main/jniLibs/arm64-v8a/libIGLImageAE.so


BIN
android/app/src/main/jniLibs/arm64-v8a/libSDL.so


BIN
android/app/src/main/jniLibs/arm64-v8a/libbarcodereader44.so


BIN
android/app/src/main/jniLibs/armeabi-v7a/libDeviceAPI.so


BIN
android/app/src/main/jniLibs/armeabi-v7a/libHHPScanInterface.so


BIN
android/app/src/main/jniLibs/armeabi-v7a/libHSMDecoderAPI.so


BIN
android/app/src/main/jniLibs/armeabi-v7a/libHsmKil.so


BIN
android/app/src/main/jniLibs/armeabi-v7a/libIAL.so


BIN
android/app/src/main/jniLibs/armeabi-v7a/libIGLBarDecoder.so


BIN
android/app/src/main/jniLibs/armeabi-v7a/libIGLImageAE.so


BIN
android/app/src/main/jniLibs/armeabi-v7a/libSDL.so


BIN
android/app/src/main/jniLibs/armeabi-v7a/libbarcodereader.so


BIN
android/app/src/main/jniLibs/armeabi-v7a/libbarcodereader43.so


BIN
android/app/src/main/jniLibs/armeabi-v7a/libbarcodereader44.so


BIN
android/app/src/main/jniLibs/armeabi/libDeviceAPI.so


BIN
android/app/src/main/jniLibs/armeabi/libHHPScanInterface.so


BIN
android/app/src/main/jniLibs/armeabi/libHSMDecoderAPI.so


BIN
android/app/src/main/jniLibs/armeabi/libHsmKil.so


BIN
android/app/src/main/jniLibs/armeabi/libIAL.so


BIN
android/app/src/main/jniLibs/armeabi/libIGLBarDecoder.so


BIN
android/app/src/main/jniLibs/armeabi/libIGLImageAE.so


BIN
android/app/src/main/jniLibs/armeabi/libSDL.so


BIN
android/app/src/main/jniLibs/armeabi/libbarcodereader.so


BIN
android/app/src/main/jniLibs/armeabi/libbarcodereader43.so


BIN
android/app/src/main/jniLibs/armeabi/libbarcodereader44.so


BIN
android/app/src/main/res/drawable-hdpi/ic_launcher.png


BIN
android/app/src/main/res/drawable-xxhdpi/ic_launcher.png


BIN
android/app/src/main/res/drawable-xxxhdpi/ic_launcher.png


+ 12 - 0
android/app/src/main/res/drawable/countdown_days.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <!-- rectangle表示为矩形 -->
+
+    <!-- 填充的颜色 -->
+    <solid android:color="@color/colorPrimary" />
+
+    <!-- android:radius 圆角的半径 -->
+    <corners android:radius="5dp" />
+
+</shape>

BIN
android/app/src/main/res/drawable/ic_back.png


+ 8 - 0
android/app/src/main/res/layout/activity_jump.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:gravity="center"
+    android:orientation="vertical">
+
+</LinearLayout>

+ 6 - 0
android/app/src/main/res/layout/activity_live.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent" style="@style/LiveStyle">
+
+</LinearLayout>

+ 8 - 0
android/app/src/main/res/layout/activity_push.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:gravity="center"
+    android:orientation="vertical">
+
+</LinearLayout>

+ 62 - 0
android/app/src/main/res/layout/notification_countdown.xml

@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="horizontal" android:layout_width="match_parent"
+    android:background="@color/colorWhite"
+    android:layout_height="90dp"
+    android:padding="10dp">
+    <LinearLayout
+        android:id="@+id/daysContainer"
+        android:orientation="horizontal"
+        android:layout_width="80dp"
+        android:padding="5dp"
+        android:background="@drawable/countdown_days"
+        android:layout_height="match_parent"
+        android:gravity="center"
+        android:layout_alignParentEnd="true">
+        <TextView
+            android:id="@+id/days"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textAlignment="center"
+            android:textColor="@color/colorWhite"
+            android:textSize="30dp"/>
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:background="@drawable/countdown_days"
+            android:textAlignment="center"
+            android:textColor="@color/color_f5f5f5"
+            android:textSize="10dp"
+            android:layout_marginTop="10dp"
+            android:text="天"/>
+    </LinearLayout>
+    <LinearLayout
+        android:orientation="vertical"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:gravity="center_vertical"
+        android:layout_toLeftOf="@id/daysContainer">
+        <LinearLayout
+            android:orientation="horizontal"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+            <TextView
+                android:id="@+id/name"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="18dp"
+                android:textColor="@color/colorAccent"/>
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="14dp"
+                android:textColor="@color/color_333333"
+                android:text=" 仅剩"/>
+        </LinearLayout>
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:textSize="15dp"
+            android:id="@+id/targetDate"/>
+    </LinearLayout>
+</RelativeLayout>

BIN
android/app/src/main/res/mipmap-hdpi/ic_back.png


BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher.png


BIN
android/app/src/main/res/mipmap-mdpi/ic_launcher.png


BIN
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png


BIN
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png


BIN
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png


BIN
android/app/src/main/res/raw/barcodebeep.ogg


BIN
android/app/src/main/res/raw/serror.ogg


+ 15 - 0
android/app/src/main/res/values/colors.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <color name="colorPrimary">#03C762</color>
+    <color name="colorPrimaryDark">#03C762</color>
+    <color name="colorAccent">#03C762</color>
+    <color name="colorWhite">#FFFFFF</color>
+    <color name="colorTip">#F44336</color>
+
+    <color name="color_f5f5f5">#f5f5f5</color>
+    <color name="color_666666">#666666</color>
+    <color name="color_333333">#333333</color>
+    <color name="color_212121">#212121</color>
+    <color name="color_757575">#757575</color>
+    <color name="color_aaaaaa">#aaaaaa</color>
+</resources>

+ 4 - 0
android/app/src/main/res/values/strings.xml

@@ -0,0 +1,4 @@
+<resources>
+    <string name="app_name">电金睛</string>
+    <string name="ok">确定</string>
+</resources>

+ 20 - 0
android/app/src/main/res/values/styles.xml

@@ -0,0 +1,20 @@
+<resources>
+
+    <!-- Base application theme. -->
+    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
+        <!-- Customize your theme here. -->
+    </style>
+
+    <style name="FullScreenTheme" parent="Theme.AppCompat.Light.NoActionBar">
+        <item name="android:windowFullscreen">true</item>
+        <item name="android:windowNoTitle">true</item>
+    </style>
+    <style name="LiveStyle">
+        <item name="android:windowBackground">@android:color/transparent</item>
+        <!--<item name="android:windowBackground">@color/colorPrimaryDark</item>-->
+        <item name="android:windowContentOverlay">@null</item>
+        <item name="android:windowIsTranslucent">true</item>
+        <item name="android:windowNoDisplay">false</item>
+        <item name="android:windowDisablePreview">true</item>
+    </style>
+</resources>

+ 45 - 0
android/build.gradle

@@ -0,0 +1,45 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+    ext {
+        buildToolsVersion = "28.0.3"
+        minSdkVersion = 19
+        compileSdkVersion = 28
+        targetSdkVersion = 28
+        androidXCore = "1.0.2"
+    }
+    repositories {
+        google()
+        jcenter()
+    }
+    dependencies {
+        classpath("com.android.tools.build:gradle:3.4.2")
+
+        // NOTE: Do not place your application dependencies here; they belong
+        // in the individual module build.gradle files
+    }
+}
+
+allprojects {
+    repositories {
+        flatDir {
+            dirs 'libs'
+        }
+        mavenLocal()
+        maven {
+            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
+            url("$rootDir/../node_modules/react-native/android")
+        }
+        maven {
+            // Android JSC is installed from npm
+            url("$rootDir/../node_modules/jsc-android/dist")
+        }
+
+        google()
+        jcenter()
+        maven { url 'https://jitpack.io' }
+        maven { url "http://dl.bintray.com/lukaville/maven" }
+        maven { url 'https://dl.bintray.com/umsdk/release' }
+
+    }
+}

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff