Drew 7 роки тому
батько
коміт
b05e27b7d7
100 змінених файлів з 1411 додано та 607 видалено
  1. 1 1
      .gitignore
  2. 5 5
      config.xml
  3. 96 86
      hooks/README.md
  4. 7 3
      package.json
  5. 0 6
      platforms/android/.classpath
  6. 0 23
      platforms/android/.project
  7. 0 2
      platforms/android/.settings/org.eclipse.buildship.core.prefs
  8. 11 11
      platforms/android/AndroidManifest.xml
  9. 0 6
      platforms/android/CordovaLib/.classpath
  10. 0 23
      platforms/android/CordovaLib/.project
  11. 0 2
      platforms/android/CordovaLib/.settings/org.eclipse.buildship.core.prefs
  12. 0 86
      platforms/android/CordovaLib/CordovaLib.iml
  13. BIN
      platforms/android/Milk.apk
  14. 0 131
      platforms/android/android.iml
  15. 120 88
      platforms/android/android.json
  16. 58 40
      platforms/android/assets/www/cordova_plugins.js
  17. 1 1
      platforms/android/assets/www/css/index.css
  18. 68 0
      platforms/android/assets/www/plugins/cordova-plugin-app-version/www/AppVersionPlugin.js
  19. 86 0
      platforms/android/assets/www/plugins/cordova-plugin-device/www/device.js
  20. 0 0
      platforms/android/assets/www/static/css/app.8a609bb43d209cc82aa99bdb491d437c.css
  21. 0 0
      platforms/android/assets/www/static/js/0.0a521feed5ffbaf371fd.js
  22. 0 0
      platforms/android/assets/www/static/js/0.e0e9326384e1b8113845.js
  23. 0 0
      platforms/android/assets/www/static/js/1.0657414e4256754bd077.js
  24. 0 0
      platforms/android/assets/www/static/js/1.6d8572b24b8692f9aa4b.js
  25. 0 0
      platforms/android/assets/www/static/js/10.50b8da3e75db2fb62b5e.js
  26. 0 0
      platforms/android/assets/www/static/js/10.5f750dc57999946c3ba0.js
  27. 0 0
      platforms/android/assets/www/static/js/11.c3f97213f3f1eca08a45.js
  28. 0 0
      platforms/android/assets/www/static/js/11.e4ea82d753359216c82d.js
  29. 0 0
      platforms/android/assets/www/static/js/12.1795a6d5363094cc3545.js
  30. 0 0
      platforms/android/assets/www/static/js/12.2c370262457040d6fb87.js
  31. 0 0
      platforms/android/assets/www/static/js/13.3f4e5921be3ba84e1768.js
  32. 0 0
      platforms/android/assets/www/static/js/13.7423fd4dafa430862b39.js
  33. 0 0
      platforms/android/assets/www/static/js/14.01c34bfa32ed507e0b5f.js
  34. 0 0
      platforms/android/assets/www/static/js/14.11caa2ec8b35ee899318.js
  35. 0 0
      platforms/android/assets/www/static/js/15.47a4f51f575b4b82f49d.js
  36. 0 0
      platforms/android/assets/www/static/js/15.bbe22a7900fd98aa2553.js
  37. 0 0
      platforms/android/assets/www/static/js/16.b751445e966564cdaebe.js
  38. 0 0
      platforms/android/assets/www/static/js/16.f0688362e88f736a9380.js
  39. 0 0
      platforms/android/assets/www/static/js/17.dca2f339fe20befab429.js
  40. 0 0
      platforms/android/assets/www/static/js/17.ebb4b0b0dd306c995c6c.js
  41. 0 0
      platforms/android/assets/www/static/js/18.89e72677fc6a7e0a077b.js
  42. 0 0
      platforms/android/assets/www/static/js/18.f2827a71fde6bde3ce7f.js
  43. 0 0
      platforms/android/assets/www/static/js/19.882f4ca7a8f245404e76.js
  44. 0 0
      platforms/android/assets/www/static/js/19.b98579c92ab7e6aa9111.js
  45. 0 0
      platforms/android/assets/www/static/js/2.a58a581b946368e4fdd4.js
  46. 0 0
      platforms/android/assets/www/static/js/2.a9a49519b70e450ba991.js
  47. 0 0
      platforms/android/assets/www/static/js/20.543ec1973297b395ae4a.js
  48. 0 0
      platforms/android/assets/www/static/js/20.e8e7388bb8497ac5227a.js
  49. 0 0
      platforms/android/assets/www/static/js/21.80dded26ae9df5f98ddb.js
  50. 0 0
      platforms/android/assets/www/static/js/21.ce05eb475224945fa3d7.js
  51. 0 0
      platforms/android/assets/www/static/js/22.324e6777a22bcd1db05c.js
  52. 0 0
      platforms/android/assets/www/static/js/22.5b809336c4c3767e5737.js
  53. 0 0
      platforms/android/assets/www/static/js/23.adbd3f4af4a05bbec2cd.js
  54. 0 0
      platforms/android/assets/www/static/js/23.eb67462fa27bea54e4d0.js
  55. 0 0
      platforms/android/assets/www/static/js/3.23eb6c06cc68424664c5.js
  56. 0 0
      platforms/android/assets/www/static/js/3.adaf17bd566554b347e5.js
  57. 0 0
      platforms/android/assets/www/static/js/4.1e49c835122c453a3245.js
  58. 0 0
      platforms/android/assets/www/static/js/4.6f172a9eedb509c25635.js
  59. 0 0
      platforms/android/assets/www/static/js/5.32db8aa955c95d784ff0.js
  60. 0 0
      platforms/android/assets/www/static/js/5.b847d20e34bfb8b429f8.js
  61. 0 0
      platforms/android/assets/www/static/js/6.5a60e1d2040b5a229acb.js
  62. 0 0
      platforms/android/assets/www/static/js/6.afa83d774d2d8956cfb1.js
  63. 0 0
      platforms/android/assets/www/static/js/7.27d85ae2c89c18af7032.js
  64. 0 0
      platforms/android/assets/www/static/js/7.741b1d4e3b176fe08c43.js
  65. 0 0
      platforms/android/assets/www/static/js/8.633a0bc06ae6adcdec64.js
  66. 0 0
      platforms/android/assets/www/static/js/8.b8ec1c93e6db3a9e0475.js
  67. 0 0
      platforms/android/assets/www/static/js/9.305e1052b9c04aa7b639.js
  68. 0 0
      platforms/android/assets/www/static/js/9.4e12652920a3fd1bbb24.js
  69. 0 0
      platforms/android/assets/www/static/js/app.7c593ed001824fde90a4.js
  70. 0 0
      platforms/android/assets/www/static/js/app.c7a55afb3489f2936469.js
  71. 0 0
      platforms/android/assets/www/static/js/manifest.2359ce705dfe3b3fe1f6.js
  72. 0 0
      platforms/android/assets/www/static/js/manifest.ad72cfdf70bd6f7519e0.js
  73. 6 7
      platforms/android/build.gradle
  74. 0 18
      platforms/android/cordova-plugin-handheld/milk-handheld.gradle
  75. 58 40
      platforms/android/libs/ModuleAPI_Android_3.0.1.0.jar
  76. 68 0
      platforms/android/platform_www/plugins/cordova-plugin-app-version/www/AppVersionPlugin.js
  77. 86 0
      platforms/android/platform_www/plugins/cordova-plugin-device/www/device.js
  78. 5 4
      platforms/android/project.properties
  79. 6 0
      platforms/android/release-signing.properties
  80. 27 19
      platforms/android/res/drawable-xhdpi/prev.png
  81. 174 0
      platforms/android/res/xml/provider_paths.xml
  82. 45 0
      platforms/android/src/org/apache/cordova/splashscreen/SplashScreen.java
  83. 34 2
      platforms/ios/.gitignore
  84. 19 1
      platforms/ios/platform_www/cordova-js-src/exec.js
  85. 68 0
      platforms/ios/platform_www/plugins/cordova-plugin-app-version/www/AppVersionPlugin.js
  86. 86 0
      platforms/ios/platform_www/plugins/cordova-plugin-camera/www/Camera.js
  87. 19 1
      platforms/ios/platform_www/plugins/cordova-plugin-handheld/www/Handheld.js
  88. 1 1
      platforms/ios/www/index.html
  89. 68 0
      platforms/ios/www/plugins/cordova-plugin-app-version/www/AppVersionPlugin.js
  90. 86 0
      platforms/ios/www/plugins/cordova-plugin-camera/www/Camera.js
  91. 0 0
      platforms/ios/www/plugins/cordova-plugin-handheld/www/Handheld.js
  92. 0 0
      platforms/ios/www/static/js/15.fe27bd979199e3a368e5.js
  93. 0 0
      platforms/ios/www/static/js/app.c7a55afb3489f2936469.js
  94. 0 0
      platforms/ios/www/static/js/app.ed94e6659f9d09fa9168.js
  95. 0 0
      platforms/ios/www/static/js/manifest.6b310e4e7932a21c08e8.js
  96. 0 0
      platforms/ios/www/static/js/manifest.ad72cfdf70bd6f7519e0.js
  97. 12 0
      platforms/ios/奶源追溯.xcodeproj/project.pbxproj
  98. 13 0
      platforms/ios/奶源追溯.xcworkspace/contents.xcworkspacedata
  99. 47 0
      platforms/ios/奶源追溯/Plugins/cordova-plugin-app-version/AppVersion.m
  100. 30 0
      platforms/ios/奶源追溯/Plugins/cordova-plugin-camera/CDVCamera.h

+ 1 - 1
.gitignore

@@ -16,7 +16,7 @@ function exec(cmd, args, options) {
     })
 }
 
-const workDir = '/Users/xiongzhu/Projects/Java/GuangMing/WebSrc/Milk'
+const workDir = '/Users/drew/Projects/Java/GuangMing/WebSrc/Milk'
 const username = 'xz'
 const password = 'xz'
 

+ 5 - 5
config.xml

@@ -1,7 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
-<widget android-targetSdkVersion="22" android-versionCode="36" id="com.izouma.milk" ios-CFBundleIdentifier="com.brightdairy.milk" ios-CFBundleVersion="1.3.6" version="1.3.6" 
-    xmlns="http://www.w3.org/ns/widgets" 
-    xmlns:cdv="http://cordova.apache.org/ns/1.0">
+<widget android-targetSdkVersion="22" android-versionCode="36" id="com.izouma.milk" ios-CFBundleIdentifier="com.brightdairy.milk" ios-CFBundleVersion="1.3.6" version="1.3.6" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
     <name>奶源追溯</name>
     <description>        A sample Apache Cordova application that responds to the deviceready event.    </description>
     <author email="dev@cordova.apache.org" href="http://cordova.io">        Apache Cordova Team    </author>
@@ -66,8 +64,10 @@
         <variable name="API_KEY" value="PPQBZ-HCQLO-MMNWE-SHIDE-Y42BH-D3F76" />
     </plugin>
     <plugin name="cordova-plugin-navigationbar" spec="/Users/xiongzhu/Projects/Cordova/Milk/node_modules/cordova-plugin-navigationbar" />
-    <engine name="android" spec="^6.3.0" />
     <plugin name="cordova-plugin-remote-injection" spec="^0.5.2" />
-    <engine name="ios" spec="~4.5.4" />
     <plugin name="cordova-plugin-handheld" spec="../handheld" />
+    <plugin name="cordova-plugin-device" spec="^2.0.2" />
+    <plugin name="cordova-plugin-app-version" spec="^0.1.9" />
+    <engine name="ios" spec="^4.5.4" />
+    <engine name="android" spec="^6.3.0" />
 </widget>

+ 96 - 86
hooks/README.md

@@ -5,25 +5,25 @@
     "requires": true,
     "dependencies": {
         "android-versions": {
-            "version": "1.2.2",
-            "resolved": "https://registry.npmjs.org/android-versions/-/android-versions-1.2.2.tgz",
-            "integrity": "sha512-LpawvakR+6l5gFXg/EXZVj9DjlUYOYiIIZqvPtyhs6Dod+uk4ut+CMtF00aBA7J2p2+h+mS/J18lNH/O00reHg==",
+            "version": "1.3.0",
+            "resolved": "http://registry.npm.taobao.org/android-versions/download/android-versions-1.3.0.tgz",
+            "integrity": "sha1-zm8+ri4WXOTtSbib62gBR0EJMEQ=",
             "requires": {
-                "semver": "5.5.0"
+                "semver": "^5.4.1"
             }
         },
         "cordova-android": {
             "version": "6.3.0",
-            "resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-6.3.0.tgz",
+            "resolved": "http://registry.npm.taobao.org/cordova-android/download/cordova-android-6.3.0.tgz",
             "integrity": "sha1-2lQYQz0lx1pZd7QoJEu+Q30BKNI=",
             "requires": {
-                "android-versions": "1.2.2",
-                "cordova-common": "2.1.0",
+                "android-versions": "^1.2.0",
+                "cordova-common": "^2.1.0",
                 "elementtree": "0.1.6",
-                "nopt": "3.0.6",
-                "properties-parser": "0.2.3",
-                "q": "1.5.0",
-                "shelljs": "0.5.3"
+                "nopt": "^3.0.1",
+                "properties-parser": "^0.2.3",
+                "q": "^1.4.1",
+                "shelljs": "^0.5.3"
             },
             "dependencies": {
                 "abbrev": {
@@ -50,14 +50,14 @@
                     "version": "0.1.1",
                     "bundled": true,
                     "requires": {
-                        "big-integer": "1.6.25"
+                        "big-integer": "^1.6.7"
                     }
                 },
                 "brace-expansion": {
                     "version": "1.1.8",
                     "bundled": true,
                     "requires": {
-                        "balanced-match": "1.0.0",
+                        "balanced-match": "^1.0.0",
                         "concat-map": "0.0.1"
                     }
                 },
@@ -69,19 +69,19 @@
                     "version": "2.1.0",
                     "bundled": true,
                     "requires": {
-                        "ansi": "0.3.1",
-                        "bplist-parser": "0.1.1",
-                        "cordova-registry-mapper": "1.1.15",
+                        "ansi": "^0.3.1",
+                        "bplist-parser": "^0.1.0",
+                        "cordova-registry-mapper": "^1.1.8",
                         "elementtree": "0.1.6",
-                        "glob": "5.0.15",
-                        "minimatch": "3.0.4",
-                        "osenv": "0.1.4",
-                        "plist": "1.2.0",
-                        "q": "1.5.0",
-                        "semver": "5.4.1",
-                        "shelljs": "0.5.3",
-                        "underscore": "1.8.3",
-                        "unorm": "1.4.1"
+                        "glob": "^5.0.13",
+                        "minimatch": "^3.0.0",
+                        "osenv": "^0.1.3",
+                        "plist": "^1.2.0",
+                        "q": "^1.4.1",
+                        "semver": "^5.0.1",
+                        "shelljs": "^0.5.3",
+                        "underscore": "^1.8.3",
+                        "unorm": "^1.3.3"
                     }
                 },
                 "cordova-registry-mapper": {
@@ -99,19 +99,19 @@
                     "version": "5.0.15",
                     "bundled": true,
                     "requires": {
-                        "inflight": "1.0.6",
-                        "inherits": "2.0.3",
-                        "minimatch": "3.0.4",
-                        "once": "1.4.0",
-                        "path-is-absolute": "1.0.1"
+                        "inflight": "^1.0.4",
+                        "inherits": "2",
+                        "minimatch": "2 || 3",
+                        "once": "^1.3.0",
+                        "path-is-absolute": "^1.0.0"
                     }
                 },
                 "inflight": {
                     "version": "1.0.6",
                     "bundled": true,
                     "requires": {
-                        "once": "1.4.0",
-                        "wrappy": "1.0.2"
+                        "once": "^1.3.0",
+                        "wrappy": "1"
                     }
                 },
                 "inherits": {
@@ -126,21 +126,21 @@
                     "version": "3.0.4",
                     "bundled": true,
                     "requires": {
-                        "brace-expansion": "1.1.8"
+                        "brace-expansion": "^1.1.7"
                     }
                 },
                 "nopt": {
                     "version": "3.0.6",
                     "bundled": true,
                     "requires": {
-                        "abbrev": "1.1.0"
+                        "abbrev": "1"
                     }
                 },
                 "once": {
                     "version": "1.4.0",
                     "bundled": true,
                     "requires": {
-                        "wrappy": "1.0.2"
+                        "wrappy": "1"
                     }
                 },
                 "os-homedir": {
@@ -155,8 +155,8 @@
                     "version": "0.1.4",
                     "bundled": true,
                     "requires": {
-                        "os-homedir": "1.0.2",
-                        "os-tmpdir": "1.0.2"
+                        "os-homedir": "^1.0.0",
+                        "os-tmpdir": "^1.0.0"
                     }
                 },
                 "path-is-absolute": {
@@ -170,7 +170,7 @@
                         "base64-js": "0.0.8",
                         "util-deprecate": "1.0.2",
                         "xmlbuilder": "4.0.0",
-                        "xmldom": "0.1.27"
+                        "xmldom": "0.1.x"
                     }
                 },
                 "properties-parser": {
@@ -213,7 +213,7 @@
                     "version": "4.0.0",
                     "bundled": true,
                     "requires": {
-                        "lodash": "3.10.1"
+                        "lodash": "^3.5.0"
                     }
                 },
                 "xmldom": {
@@ -228,13 +228,13 @@
             "integrity": "sha1-yAZIBYlyloVw3BXalzFP+S0H3+c=",
             "requires": {
                 "cordova-common": "2.1.0",
-                "ios-sim": "6.1.2",
-                "nopt": "3.0.6",
-                "plist": "1.2.0",
-                "q": "1.5.1",
-                "shelljs": "0.5.3",
-                "xcode": "0.9.3",
-                "xml-escape": "1.1.0"
+                "ios-sim": "^6.1.2",
+                "nopt": "^3.0.6",
+                "plist": "^1.2.0",
+                "q": "^1.4.1",
+                "shelljs": "^0.5.3",
+                "xcode": "^0.9.0",
+                "xml-escape": "^1.1.0"
             },
             "dependencies": {
                 "abbrev": {
@@ -261,21 +261,21 @@
                     "version": "0.0.7",
                     "bundled": true,
                     "requires": {
-                        "stream-buffers": "2.2.0"
+                        "stream-buffers": "~2.2.0"
                     }
                 },
                 "bplist-parser": {
                     "version": "0.1.1",
                     "bundled": true,
                     "requires": {
-                        "big-integer": "1.6.25"
+                        "big-integer": "^1.6.7"
                     }
                 },
                 "brace-expansion": {
                     "version": "1.1.8",
                     "bundled": true,
                     "requires": {
-                        "balanced-match": "1.0.0",
+                        "balanced-match": "^1.0.0",
                         "concat-map": "0.0.1"
                     }
                 },
@@ -287,19 +287,19 @@
                     "version": "2.1.0",
                     "bundled": true,
                     "requires": {
-                        "ansi": "0.3.1",
-                        "bplist-parser": "0.1.1",
-                        "cordova-registry-mapper": "1.1.15",
+                        "ansi": "^0.3.1",
+                        "bplist-parser": "^0.1.0",
+                        "cordova-registry-mapper": "^1.1.8",
                         "elementtree": "0.1.6",
-                        "glob": "5.0.15",
-                        "minimatch": "3.0.4",
-                        "osenv": "0.1.4",
-                        "plist": "1.2.0",
-                        "q": "1.5.1",
-                        "semver": "5.4.1",
-                        "shelljs": "0.5.3",
-                        "underscore": "1.8.3",
-                        "unorm": "1.4.1"
+                        "glob": "^5.0.13",
+                        "minimatch": "^3.0.0",
+                        "osenv": "^0.1.3",
+                        "plist": "^1.2.0",
+                        "q": "^1.4.1",
+                        "semver": "^5.0.1",
+                        "shelljs": "^0.5.3",
+                        "underscore": "^1.8.3",
+                        "unorm": "^1.3.3"
                     }
                 },
                 "cordova-registry-mapper": {
@@ -317,19 +317,19 @@
                     "version": "5.0.15",
                     "bundled": true,
                     "requires": {
-                        "inflight": "1.0.6",
-                        "inherits": "2.0.3",
-                        "minimatch": "3.0.4",
-                        "once": "1.4.0",
-                        "path-is-absolute": "1.0.1"
+                        "inflight": "^1.0.4",
+                        "inherits": "2",
+                        "minimatch": "2 || 3",
+                        "once": "^1.3.0",
+                        "path-is-absolute": "^1.0.0"
                     }
                 },
                 "inflight": {
                     "version": "1.0.6",
                     "bundled": true,
                     "requires": {
-                        "once": "1.4.0",
-                        "wrappy": "1.0.2"
+                        "once": "^1.3.0",
+                        "wrappy": "1"
                     }
                 },
                 "inherits": {
@@ -340,10 +340,10 @@
                     "version": "6.1.2",
                     "bundled": true,
                     "requires": {
-                        "bplist-parser": "0.0.6",
+                        "bplist-parser": "^0.0.6",
                         "nopt": "1.0.9",
-                        "plist": "1.2.0",
-                        "simctl": "1.1.1"
+                        "plist": "^1.2.0",
+                        "simctl": "^1.1.1"
                     },
                     "dependencies": {
                         "bplist-parser": {
@@ -354,7 +354,7 @@
                             "version": "1.0.9",
                             "bundled": true,
                             "requires": {
-                                "abbrev": "1.1.1"
+                                "abbrev": "1"
                             }
                         }
                     }
@@ -367,21 +367,21 @@
                     "version": "3.0.4",
                     "bundled": true,
                     "requires": {
-                        "brace-expansion": "1.1.8"
+                        "brace-expansion": "^1.1.7"
                     }
                 },
                 "nopt": {
                     "version": "3.0.6",
                     "bundled": true,
                     "requires": {
-                        "abbrev": "1.1.1"
+                        "abbrev": "1"
                     }
                 },
                 "once": {
                     "version": "1.4.0",
                     "bundled": true,
                     "requires": {
-                        "wrappy": "1.0.2"
+                        "wrappy": "1"
                     }
                 },
                 "os-homedir": {
@@ -396,8 +396,8 @@
                     "version": "0.1.4",
                     "bundled": true,
                     "requires": {
-                        "os-homedir": "1.0.2",
-                        "os-tmpdir": "1.0.2"
+                        "os-homedir": "^1.0.0",
+                        "os-tmpdir": "^1.0.0"
                     }
                 },
                 "path-is-absolute": {
@@ -415,7 +415,7 @@
                         "base64-js": "0.0.8",
                         "util-deprecate": "1.0.2",
                         "xmlbuilder": "4.0.0",
-                        "xmldom": "0.1.27"
+                        "xmldom": "0.1.x"
                     }
                 },
                 "q": {
@@ -438,8 +438,8 @@
                     "version": "1.1.1",
                     "bundled": true,
                     "requires": {
-                        "shelljs": "0.2.6",
-                        "tail": "0.4.0"
+                        "shelljs": "^0.2.6",
+                        "tail": "^0.4.0"
                     },
                     "dependencies": {
                         "shelljs": {
@@ -467,7 +467,7 @@
                             "requires": {
                                 "base64-js": "1.1.2",
                                 "xmlbuilder": "8.2.2",
-                                "xmldom": "0.1.27"
+                                "xmldom": "0.1.x"
                             }
                         },
                         "xmlbuilder": {
@@ -508,8 +508,8 @@
                     "version": "0.9.3",
                     "bundled": true,
                     "requires": {
-                        "pegjs": "0.10.0",
-                        "simple-plist": "0.2.1",
+                        "pegjs": "^0.10.0",
+                        "simple-plist": "^0.2.1",
                         "uuid": "3.0.1"
                     }
                 },
@@ -521,7 +521,7 @@
                     "version": "4.0.0",
                     "bundled": true,
                     "requires": {
-                        "lodash": "3.10.1"
+                        "lodash": "^3.5.0"
                     }
                 },
                 "xmldom": {
@@ -530,11 +530,21 @@
                 }
             }
         },
+        "cordova-plugin-app-version": {
+            "version": "0.1.9",
+            "resolved": "http://registry.npm.taobao.org/cordova-plugin-app-version/download/cordova-plugin-app-version-0.1.9.tgz",
+            "integrity": "sha1-nbBgeGMzenEEiTAuX1CpBPFEm9s="
+        },
         "cordova-plugin-camera": {
             "version": "4.0.2",
             "resolved": "https://registry.npmjs.org/cordova-plugin-camera/-/cordova-plugin-camera-4.0.2.tgz",
             "integrity": "sha1-MJQQkn70Ctxr69Sw6R3yyMZE84o="
         },
+        "cordova-plugin-device": {
+            "version": "2.0.2",
+            "resolved": "http://registry.npm.taobao.org/cordova-plugin-device/download/cordova-plugin-device-2.0.2.tgz",
+            "integrity": "sha1-/Ajzci5n7ve2xnv8mag99q3Quro="
+        },
         "cordova-plugin-handheld": {
             "version": "file:../handheld"
         },
@@ -574,8 +584,8 @@
         },
         "semver": {
             "version": "5.5.0",
-            "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
-            "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA=="
+            "resolved": "http://registry.npm.taobao.org/semver/download/semver-5.5.0.tgz",
+            "integrity": "sha1-3Eu8emyp2Rbe5dQ1FvAJK1j3uKs="
         }
     }
 }

+ 7 - 3
package.json

@@ -12,7 +12,9 @@
     "dependencies": {
         "cordova-android": "^6.3.0",
         "cordova-ios": "^4.5.4",
+        "cordova-plugin-app-version": "^0.1.9",
         "cordova-plugin-camera": "^4.0.2",
+        "cordova-plugin-device": "^2.0.2",
         "cordova-plugin-handheld": "file:../handheld",
         "cordova-plugin-navigationbar": "file:../navigationbar",
         "cordova-plugin-pgyer": "file:../pgyer",
@@ -38,11 +40,13 @@
             },
             "cordova-plugin-navigationbar": {},
             "cordova-plugin-remote-injection": {},
-            "cordova-plugin-handheld": {}
+            "cordova-plugin-handheld": {},
+            "cordova-plugin-device": {},
+            "cordova-plugin-app-version": {}
         },
         "platforms": [
-            "android",
-            "ios"
+            "ios",
+            "android"
         ]
     }
 }

+ 0 - 6
platforms/android/.classpath

@@ -1,6 +0,0 @@
-<?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"/>
-</classpath>

+ 0 - 23
platforms/android/.project

@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>android</name>
-	<comment>Project android 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>

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

@@ -1,2 +0,0 @@
-#Mon May 07 10:24:59 CST 2018
-connection.project.dir=

+ 11 - 11
platforms/android/AndroidManifest.xml

@@ -9,29 +9,29 @@
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
-        <meta-data android:name="PGYER_APPID" android:value="d0f09be14a67a2082bdf777eb0b2a8c2" />
         <provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="android.support.v4.content.FileProvider">
             <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths" />
         </provider>
+        <activity android:name="com.izouma.handheld.ScanActivity" />
+        <meta-data android:name="PGYER_APPID" android:value="d0f09be14a67a2082bdf777eb0b2a8c2" />
         <meta-data android:name="TencentMapSDK" android:value="PPQBZ-HCQLO-MMNWE-SHIDE-Y42BH-D3F76" />
         <service android:enabled="true" android:exported="false" android:name="cn.x1ongzhu.tencentBgLocation.LocationService" />
-        <activity android:name="com.izouma.handheld.ScanActivity" />
     </application>
-    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="22" />
-    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
-    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
-    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
-    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
-    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
-    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
+    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26" />
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
     <uses-feature android:name="android.hardware.camera" />
     <uses-feature android:name="android.hardware.camera.autofocus" />
     <uses-permission android:name="android.permission.CAMERA" />
     <uses-permission android:name="android.permission.FLASHLIGHT" />
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
     <uses-permission android:name="android.permission.WAKE_LOCK" />
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.WRITE_SETTINGS" />
     <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
+    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
+    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
+    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
+    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
+    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
+    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
 </manifest>

+ 0 - 6
platforms/android/CordovaLib/.classpath

@@ -1,6 +0,0 @@
-<?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"/>
-</classpath>

+ 0 - 23
platforms/android/CordovaLib/.project

@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>CordovaLib</name>
-	<comment>Project CordovaLib 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>

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

@@ -1,2 +0,0 @@
-#Mon May 07 10:24:59 CST 2018
-connection.project.dir=..

+ 0 - 86
platforms/android/CordovaLib/CordovaLib.iml

@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id=":CordovaLib" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="android-gradle" name="Android-Gradle">
-      <configuration>
-        <option name="GRADLE_PROJECT_PATH" value=":CordovaLib" />
-      </configuration>
-    </facet>
-    <facet type="android" name="Android">
-      <configuration>
-        <option name="SELECTED_BUILD_VARIANT" value="debug" />
-        <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
-        <option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
-        <afterSyncTasks>
-          <task>generateDebugSources</task>
-        </afterSyncTasks>
-        <option name="ALLOW_USER_CONFIGURATION" value="false" />
-        <option name="RES_FOLDERS_RELATIVE_PATH" value="" />
-        <option name="PROJECT_TYPE" value="1" />
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6">
-    <output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
-    <output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
-    <exclude-output />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/res" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/assets" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
-      <excludeFolder url="file://$MODULE_DIR$/build/outputs" />
-    </content>
-    <orderEntry type="jdk" jdkName="Android API 26 Platform" jdkType="Android SDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
-</module>

BIN
platforms/android/Milk.apk


+ 0 - 131
platforms/android/android.iml

@@ -1,131 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id="android" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="android-gradle" name="Android-Gradle">
-      <configuration>
-        <option name="GRADLE_PROJECT_PATH" value=":" />
-      </configuration>
-    </facet>
-    <facet type="android" name="Android">
-      <configuration>
-        <option name="SELECTED_BUILD_VARIANT" value="debug" />
-        <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
-        <option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
-        <afterSyncTasks>
-          <task>generateDebugSources</task>
-        </afterSyncTasks>
-        <option name="ALLOW_USER_CONFIGURATION" value="false" />
-        <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/res" />
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6">
-    <output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
-    <output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
-    <exclude-output />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/res" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/assets" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/bga-qrcode-zxing/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/25.3.1/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/25.3.1/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-compat/25.3.1/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-ui/25.3.1/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-utils/25.3.1/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-fragment/25.3.1/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-media-compat/25.3.1/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/25.3.1/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/25.3.1/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.yanzhenjie.alertdialog/alertdialog/1.0.1/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.yanzhenjie/permission/1.1.2/jars" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
-      <excludeFolder url="file://$MODULE_DIR$/build/outputs" />
-    </content>
-    <orderEntry type="jdk" jdkName="Android API 26 Platform" jdkType="Android SDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" exported="" name="Gradle: com.android.support:appcompat-v7-25.3.1" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-fragment-25.3.1" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-annotations:25.3.1@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: __local_jars__:/Users/xiongzhu/Projects/Cordova/Milk/platforms/android/libs/Module_Android_DemoPower_1.6.5.1.jar:unspecified@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: __local_jars__:/Users/xiongzhu/Projects/Cordova/Milk/platforms/android/libs/pgyer_sdk_android_2.8.1.jar:unspecified@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: __local_jars__:/Users/xiongzhu/Projects/Cordova/Milk/platforms/android/libs/invengo.system.device.jar:unspecified@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: __local_jars__:/Users/xiongzhu/Projects/Cordova/Milk/platforms/android/libs/trinea-android-common.jar:unspecified@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.yanzhenjie.alertdialog:alertdialog-1.0.1" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-media-compat-25.3.1" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: __local_jars__:/Users/xiongzhu/Projects/Cordova/Milk/platforms/android/libs/invengo.system.ctrl.jar:unspecified@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: __local_jars__:/Users/xiongzhu/Projects/Cordova/Milk/platforms/android/libs/ch.ntb.usb-0.5.9.jar:unspecified@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.squareup.okio:okio:1.13.0@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: bga-qrcode-zxing:@aar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.android.support:animated-vector-drawable-25.3.1" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: __local_jars__:/Users/xiongzhu/Projects/Cordova/Milk/platforms/android/libs/UHF_API_JAR.jar:unspecified@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-compat-25.3.1" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.squareup.retrofit2:converter-gson:2.3.0@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: __local_jars__:/Users/xiongzhu/Projects/Cordova/Milk/platforms/android/libs/ModuleAPI_Android_3.0.1.0.jar:unspecified@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: __local_jars__:/Users/xiongzhu/Projects/Cordova/Milk/platforms/android/libs/xUtils-2.5.5.jar:unspecified@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: __local_jars__:/Users/xiongzhu/Projects/Cordova/Milk/platforms/android/libs/invengo.irp1.jar:unspecified@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-v4-25.3.1" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.squareup.retrofit2:retrofit:2.3.0@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: __local_jars__:/Users/xiongzhu/Projects/Cordova/Milk/platforms/android/libs/TencentLocationSdk_v6.2.5.3.jar:unspecified@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-core-ui-25.3.1" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: __local_jars__:/Users/xiongzhu/Projects/Cordova/Milk/platforms/android/libs/hitownsdk.jar:unspecified@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: __local_jars__:/Users/xiongzhu/Projects/Cordova/Milk/platforms/android/libs/invengo.util.jar:unspecified@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.google.code.gson:gson:2.8.2@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.squareup.okhttp3:okhttp:3.8.0@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: __local_jars__:/Users/xiongzhu/Projects/Cordova/Milk/platforms/android/libs/classes.jar:unspecified@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.yanzhenjie:permission-1.1.2" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-vector-drawable-25.3.1" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: __local_jars__:/Users/xiongzhu/Projects/Cordova/Milk/platforms/android/libs/cw-deviceapi20171113.jar:unspecified@jar" level="project" />
-    <orderEntry type="library" exported="" name="Gradle: com.android.support:support-core-utils-25.3.1" level="project" />
-    <orderEntry type="module" module-name="CordovaLib" exported="" />
-  </component>
-</module>

+ 120 - 88
platforms/android/android.json

@@ -9,15 +9,23 @@
         "parents": {
           "/*": [
             {
-              "xml": "<feature name=\"Whitelist\"><param name=\"android-package\" value=\"org.apache.cordova.whitelist.WhitelistPlugin\" /><param name=\"onload\" value=\"true\" /></feature>",
+              "xml": "<feature name=\"AppVersion\"><param name=\"android-package\" value=\"uk.co.whiteoctober.cordova.AppVersion\" /></feature>",
               "count": 1
             },
             {
-              "xml": "<feature name=\"SplashScreen\"><param name=\"android-package\" value=\"org.apache.cordova.splashscreen.SplashScreen\" /><param name=\"onload\" value=\"true\" /></feature>",
+              "xml": "<feature name=\"Camera\"><param name=\"android-package\" value=\"org.apache.cordova.camera.CameraLauncher\" /></feature>",
               "count": 1
             },
             {
-              "xml": "<feature name=\"Toast\"><param name=\"android-package\" value=\"nl.xservices.plugins.Toast\" /></feature>",
+              "xml": "<feature name=\"Device\"><param name=\"android-package\" value=\"org.apache.cordova.device.Device\" /></feature>",
+              "count": 1
+            },
+            {
+              "xml": "<feature name=\"Handheld\"><param name=\"android-package\" value=\"com.izouma.handheld.Handheld\" /><param name=\"onload\" value=\"true\" /></feature>",
+              "count": 1
+            },
+            {
+              "xml": "<feature name=\"navigationbar\"><param name=\"android-package\" value=\"cn.x1ongzhu.navigationbar.navigationbar\" /></feature>",
               "count": 1
             },
             {
@@ -25,7 +33,7 @@
               "count": 1
             },
             {
-              "xml": "<feature name=\"Camera\"><param name=\"android-package\" value=\"org.apache.cordova.camera.CameraLauncher\" /></feature>",
+              "xml": "<feature name=\"SplashScreen\"><param name=\"android-package\" value=\"org.apache.cordova.splashscreen.SplashScreen\" /><param name=\"onload\" value=\"true\" /></feature>",
               "count": 1
             },
             {
@@ -33,11 +41,11 @@
               "count": 1
             },
             {
-              "xml": "<feature name=\"navigationbar\"><param name=\"android-package\" value=\"cn.x1ongzhu.navigationbar.navigationbar\" /></feature>",
+              "xml": "<feature name=\"Whitelist\"><param name=\"android-package\" value=\"org.apache.cordova.whitelist.WhitelistPlugin\" /><param name=\"onload\" value=\"true\" /></feature>",
               "count": 1
             },
             {
-              "xml": "<feature name=\"Handheld\"><param name=\"android-package\" value=\"com.izouma.handheld.Handheld\" /><param name=\"onload\" value=\"true\" /></feature>",
+              "xml": "<feature name=\"Toast\"><param name=\"android-package\" value=\"nl.xservices.plugins.Toast\" /></feature>",
               "count": 1
             }
           ]
@@ -47,95 +55,95 @@
         "parents": {
           "/*": [
             {
-              "xml": "<uses-permission android:name=\"android.permission.INTERNET\" />",
-              "count": 2
+              "xml": "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />",
+              "count": 4
             },
             {
-              "xml": "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\" />",
-              "count": 2
+              "xml": "<uses-feature android:name=\"android.hardware.camera\" />",
+              "count": 1
             },
             {
-              "xml": "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />",
-              "count": 2
+              "xml": "<uses-feature android:name=\"android.hardware.camera.autofocus\" />",
+              "count": 1
             },
             {
-              "xml": "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\" />",
-              "count": 2
+              "xml": "<uses-permission android:name=\"android.permission.CAMERA\" />",
+              "count": 1
             },
             {
-              "xml": "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" />",
+              "xml": "<uses-permission android:name=\"android.permission.FLASHLIGHT\" />",
               "count": 1
             },
             {
-              "xml": "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" />",
-              "count": 1
+              "xml": "<uses-permission android:name=\"android.permission.INTERNET\" />",
+              "count": 3
             },
             {
-              "xml": "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\" />",
-              "count": 1
+              "xml": "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />",
+              "count": 3
             },
             {
-              "xml": "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\" />",
+              "xml": "<uses-permission android:name=\"android.permission.WAKE_LOCK\" />",
               "count": 1
             },
             {
-              "xml": "<uses-feature android:name=\"android.hardware.camera\" />",
+              "xml": "<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />",
               "count": 1
             },
             {
-              "xml": "<uses-feature android:name=\"android.hardware.camera.autofocus\" />",
+              "xml": "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\" />",
               "count": 1
             },
             {
-              "xml": "<uses-permission android:name=\"android.permission.CAMERA\" />",
+              "xml": "<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\" />",
               "count": 1
             },
             {
-              "xml": "<uses-permission android:name=\"android.permission.FLASHLIGHT\" />",
-              "count": 1
+              "xml": "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\" />",
+              "count": 2
             },
             {
-              "xml": "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />",
+              "xml": "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\" />",
               "count": 2
             },
             {
-              "xml": "<uses-permission android:name=\"android.permission.WAKE_LOCK\" />",
+              "xml": "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" />",
               "count": 1
             },
             {
-              "xml": "<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />",
+              "xml": "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" />",
               "count": 1
             },
             {
-              "xml": "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\" />",
+              "xml": "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\" />",
               "count": 1
             },
             {
-              "xml": "<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\" />",
+              "xml": "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\" />",
               "count": 1
             }
           ],
-          "/manifest/application": [
+          "application": [
             {
-              "xml": "<meta-data android:name=\"PGYER_APPID\" android:value=\"d0f09be14a67a2082bdf777eb0b2a8c2\" />",
+              "xml": "<provider android:authorities=\"${applicationId}.provider\" android:exported=\"false\" android:grantUriPermissions=\"true\" android:name=\"android.support.v4.content.FileProvider\"><meta-data android:name=\"android.support.FILE_PROVIDER_PATHS\" android:resource=\"@xml/provider_paths\" /></provider>",
               "count": 1
-            },
+            }
+          ],
+          "/manifest/application": [
             {
-              "xml": "<meta-data android:name=\"TencentMapSDK\" android:value=\"PPQBZ-HCQLO-MMNWE-SHIDE-Y42BH-D3F76\" />",
+              "xml": "<activity android:name=\"com.izouma.handheld.ScanActivity\" />",
               "count": 1
             },
             {
-              "xml": "<service android:enabled=\"true\" android:exported=\"false\" android:name=\"cn.x1ongzhu.tencentBgLocation.LocationService\" />",
+              "xml": "<meta-data android:name=\"PGYER_APPID\" android:value=\"d0f09be14a67a2082bdf777eb0b2a8c2\" />",
               "count": 1
             },
             {
-              "xml": "<activity android:name=\"com.izouma.handheld.ScanActivity\" />",
+              "xml": "<meta-data android:name=\"TencentMapSDK\" android:value=\"PPQBZ-HCQLO-MMNWE-SHIDE-Y42BH-D3F76\" />",
               "count": 1
-            }
-          ],
-          "application": [
+            },
             {
-              "xml": "<provider android:authorities=\"${applicationId}.provider\" android:exported=\"false\" android:grantUriPermissions=\"true\" android:name=\"android.support.v4.content.FileProvider\"><meta-data android:name=\"android.support.FILE_PROVIDER_PATHS\" android:resource=\"@xml/provider_paths\" /></provider>",
+              "xml": "<service android:enabled=\"true\" android:exported=\"false\" android:name=\"cn.x1ongzhu.tencentBgLocation.LocationService\" />",
               "count": 1
             }
           ]
@@ -154,68 +162,53 @@
     }
   },
   "installed_plugins": {
-    "cordova-plugin-whitelist": {
+    "cordova-plugin-app-version": {
       "PACKAGE_NAME": "com.izouma.milk"
     },
-    "cordova-plugin-splashscreen": {
+    "cordova-plugin-camera": {
       "PACKAGE_NAME": "com.izouma.milk"
     },
-    "cordova-plugin-x-toast": {
+    "cordova-plugin-device": {
+      "PACKAGE_NAME": "com.izouma.milk"
+    },
+    "cordova-plugin-handheld": {
+      "PACKAGE_NAME": "com.izouma.milk"
+    },
+    "cordova-plugin-navigationbar": {
       "PACKAGE_NAME": "com.izouma.milk"
     },
     "cordova-plugin-pgyer": {
       "APP_ID": "d0f09be14a67a2082bdf777eb0b2a8c2",
       "PACKAGE_NAME": "com.izouma.milk"
     },
-    "cordova-plugin-wkwebview-engine": {
+    "cordova-plugin-remote-injection": {
       "PACKAGE_NAME": "com.izouma.milk"
     },
-    "cordova-plugin-camera": {
+    "cordova-plugin-splashscreen": {
       "PACKAGE_NAME": "com.izouma.milk"
     },
     "cordova-plugin-tencent-bg-location": {
       "API_KEY": "PPQBZ-HCQLO-MMNWE-SHIDE-Y42BH-D3F76",
       "PACKAGE_NAME": "com.izouma.milk"
     },
-    "cordova-plugin-navigationbar": {
+    "cordova-plugin-whitelist": {
       "PACKAGE_NAME": "com.izouma.milk"
     },
-    "cordova-plugin-remote-injection": {
+    "cordova-plugin-wkwebview-engine": {
       "PACKAGE_NAME": "com.izouma.milk"
     },
-    "cordova-plugin-handheld": {
+    "cordova-plugin-x-toast": {
       "PACKAGE_NAME": "com.izouma.milk"
     }
   },
   "dependent_plugins": {},
   "modules": [
     {
-      "id": "cordova-plugin-splashscreen.SplashScreen",
-      "file": "plugins/cordova-plugin-splashscreen/www/splashscreen.js",
-      "pluginId": "cordova-plugin-splashscreen",
-      "clobbers": [
-        "navigator.splashscreen"
-      ]
-    },
-    {
-      "id": "cordova-plugin-x-toast.Toast",
-      "file": "plugins/cordova-plugin-x-toast/www/Toast.js",
-      "pluginId": "cordova-plugin-x-toast",
+      "id": "cordova-plugin-app-version.AppVersionPlugin",
+      "file": "plugins/cordova-plugin-app-version/www/AppVersionPlugin.js",
+      "pluginId": "cordova-plugin-app-version",
       "clobbers": [
-        "window.plugins.toast"
-      ]
-    },
-    {
-      "id": "cordova-plugin-x-toast.tests",
-      "file": "plugins/cordova-plugin-x-toast/test/tests.js",
-      "pluginId": "cordova-plugin-x-toast"
-    },
-    {
-      "id": "cordova-plugin-pgyer.pgyer",
-      "file": "plugins/cordova-plugin-pgyer/www/pgyer.js",
-      "pluginId": "cordova-plugin-pgyer",
-      "clobbers": [
-        "cordova.plugins.pgyer"
+        "cordova.getAppVersion"
       ]
     },
     {
@@ -251,11 +244,19 @@
       ]
     },
     {
-      "id": "cordova-plugin-tencent-bg-location.tencentBgLocation",
-      "file": "plugins/cordova-plugin-tencent-bg-location/www/tencentBgLocation.js",
-      "pluginId": "cordova-plugin-tencent-bg-location",
+      "id": "cordova-plugin-device.device",
+      "file": "plugins/cordova-plugin-device/www/device.js",
+      "pluginId": "cordova-plugin-device",
       "clobbers": [
-        "tencentBgLocation"
+        "device"
+      ]
+    },
+    {
+      "id": "cordova-plugin-handheld.Handheld",
+      "file": "plugins/cordova-plugin-handheld/www/Handheld.js",
+      "pluginId": "cordova-plugin-handheld",
+      "clobbers": [
+        "Handheld"
       ]
     },
     {
@@ -267,24 +268,55 @@
       ]
     },
     {
-      "id": "cordova-plugin-handheld.Handheld",
-      "file": "plugins/cordova-plugin-handheld/www/Handheld.js",
-      "pluginId": "cordova-plugin-handheld",
+      "id": "cordova-plugin-pgyer.pgyer",
+      "file": "plugins/cordova-plugin-pgyer/www/pgyer.js",
+      "pluginId": "cordova-plugin-pgyer",
       "clobbers": [
-        "Handheld"
+        "cordova.plugins.pgyer"
+      ]
+    },
+    {
+      "id": "cordova-plugin-splashscreen.SplashScreen",
+      "file": "plugins/cordova-plugin-splashscreen/www/splashscreen.js",
+      "pluginId": "cordova-plugin-splashscreen",
+      "clobbers": [
+        "navigator.splashscreen"
+      ]
+    },
+    {
+      "id": "cordova-plugin-tencent-bg-location.tencentBgLocation",
+      "file": "plugins/cordova-plugin-tencent-bg-location/www/tencentBgLocation.js",
+      "pluginId": "cordova-plugin-tencent-bg-location",
+      "clobbers": [
+        "tencentBgLocation"
       ]
+    },
+    {
+      "id": "cordova-plugin-x-toast.Toast",
+      "file": "plugins/cordova-plugin-x-toast/www/Toast.js",
+      "pluginId": "cordova-plugin-x-toast",
+      "clobbers": [
+        "window.plugins.toast"
+      ]
+    },
+    {
+      "id": "cordova-plugin-x-toast.tests",
+      "file": "plugins/cordova-plugin-x-toast/test/tests.js",
+      "pluginId": "cordova-plugin-x-toast"
     }
   ],
   "plugin_metadata": {
-    "cordova-plugin-whitelist": "1.3.3",
-    "cordova-plugin-splashscreen": "5.0.1",
-    "cordova-plugin-x-toast": "2.6.0",
-    "cordova-plugin-pgyer": "1.0.0",
-    "cordova-plugin-wkwebview-engine": "1.1.4",
+    "cordova-plugin-app-version": "0.1.9",
     "cordova-plugin-camera": "4.0.2",
-    "cordova-plugin-tencent-bg-location": "1.0.0",
+    "cordova-plugin-device": "2.0.2",
+    "cordova-plugin-handheld": "1.0.0",
     "cordova-plugin-navigationbar": "1.0.0",
+    "cordova-plugin-pgyer": "1.0.0",
     "cordova-plugin-remote-injection": "0.5.2",
-    "cordova-plugin-handheld": "1.0.0"
+    "cordova-plugin-splashscreen": "5.0.1",
+    "cordova-plugin-tencent-bg-location": "1.0.0",
+    "cordova-plugin-whitelist": "1.3.3",
+    "cordova-plugin-wkwebview-engine": "1.1.4",
+    "cordova-plugin-x-toast": "2.6.0"
   }
 }

+ 58 - 40
platforms/android/assets/www/cordova_plugins.js

@@ -1,32 +1,11 @@
 cordova.define('cordova/plugin_list', function(require, exports, module) {
 module.exports = [
   {
-    "id": "cordova-plugin-splashscreen.SplashScreen",
-    "file": "plugins/cordova-plugin-splashscreen/www/splashscreen.js",
-    "pluginId": "cordova-plugin-splashscreen",
-    "clobbers": [
-      "navigator.splashscreen"
-    ]
-  },
-  {
-    "id": "cordova-plugin-x-toast.Toast",
-    "file": "plugins/cordova-plugin-x-toast/www/Toast.js",
-    "pluginId": "cordova-plugin-x-toast",
-    "clobbers": [
-      "window.plugins.toast"
-    ]
-  },
-  {
-    "id": "cordova-plugin-x-toast.tests",
-    "file": "plugins/cordova-plugin-x-toast/test/tests.js",
-    "pluginId": "cordova-plugin-x-toast"
-  },
-  {
-    "id": "cordova-plugin-pgyer.pgyer",
-    "file": "plugins/cordova-plugin-pgyer/www/pgyer.js",
-    "pluginId": "cordova-plugin-pgyer",
+    "id": "cordova-plugin-app-version.AppVersionPlugin",
+    "file": "plugins/cordova-plugin-app-version/www/AppVersionPlugin.js",
+    "pluginId": "cordova-plugin-app-version",
     "clobbers": [
-      "cordova.plugins.pgyer"
+      "cordova.getAppVersion"
     ]
   },
   {
@@ -62,11 +41,19 @@ module.exports = [
     ]
   },
   {
-    "id": "cordova-plugin-tencent-bg-location.tencentBgLocation",
-    "file": "plugins/cordova-plugin-tencent-bg-location/www/tencentBgLocation.js",
-    "pluginId": "cordova-plugin-tencent-bg-location",
+    "id": "cordova-plugin-device.device",
+    "file": "plugins/cordova-plugin-device/www/device.js",
+    "pluginId": "cordova-plugin-device",
     "clobbers": [
-      "tencentBgLocation"
+      "device"
+    ]
+  },
+  {
+    "id": "cordova-plugin-handheld.Handheld",
+    "file": "plugins/cordova-plugin-handheld/www/Handheld.js",
+    "pluginId": "cordova-plugin-handheld",
+    "clobbers": [
+      "Handheld"
     ]
   },
   {
@@ -78,27 +65,58 @@ module.exports = [
     ]
   },
   {
-    "id": "cordova-plugin-handheld.Handheld",
-    "file": "plugins/cordova-plugin-handheld/www/Handheld.js",
-    "pluginId": "cordova-plugin-handheld",
+    "id": "cordova-plugin-pgyer.pgyer",
+    "file": "plugins/cordova-plugin-pgyer/www/pgyer.js",
+    "pluginId": "cordova-plugin-pgyer",
     "clobbers": [
-      "Handheld"
+      "cordova.plugins.pgyer"
+    ]
+  },
+  {
+    "id": "cordova-plugin-splashscreen.SplashScreen",
+    "file": "plugins/cordova-plugin-splashscreen/www/splashscreen.js",
+    "pluginId": "cordova-plugin-splashscreen",
+    "clobbers": [
+      "navigator.splashscreen"
+    ]
+  },
+  {
+    "id": "cordova-plugin-tencent-bg-location.tencentBgLocation",
+    "file": "plugins/cordova-plugin-tencent-bg-location/www/tencentBgLocation.js",
+    "pluginId": "cordova-plugin-tencent-bg-location",
+    "clobbers": [
+      "tencentBgLocation"
+    ]
+  },
+  {
+    "id": "cordova-plugin-x-toast.Toast",
+    "file": "plugins/cordova-plugin-x-toast/www/Toast.js",
+    "pluginId": "cordova-plugin-x-toast",
+    "clobbers": [
+      "window.plugins.toast"
     ]
+  },
+  {
+    "id": "cordova-plugin-x-toast.tests",
+    "file": "plugins/cordova-plugin-x-toast/test/tests.js",
+    "pluginId": "cordova-plugin-x-toast"
   }
 ];
 module.exports.metadata = 
 // TOP OF METADATA
 {
-  "cordova-plugin-whitelist": "1.3.3",
-  "cordova-plugin-splashscreen": "5.0.1",
-  "cordova-plugin-x-toast": "2.6.0",
-  "cordova-plugin-pgyer": "1.0.0",
-  "cordova-plugin-wkwebview-engine": "1.1.4",
+  "cordova-plugin-app-version": "0.1.9",
   "cordova-plugin-camera": "4.0.2",
-  "cordova-plugin-tencent-bg-location": "1.0.0",
+  "cordova-plugin-device": "2.0.2",
+  "cordova-plugin-handheld": "1.0.0",
   "cordova-plugin-navigationbar": "1.0.0",
+  "cordova-plugin-pgyer": "1.0.0",
   "cordova-plugin-remote-injection": "0.5.2",
-  "cordova-plugin-handheld": "1.0.0"
+  "cordova-plugin-splashscreen": "5.0.1",
+  "cordova-plugin-tencent-bg-location": "1.0.0",
+  "cordova-plugin-whitelist": "1.3.3",
+  "cordova-plugin-wkwebview-engine": "1.1.4",
+  "cordova-plugin-x-toast": "2.6.0"
 };
 // BOTTOM OF METADATA
 });

+ 1 - 1
platforms/android/assets/www/css/index.css

@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=format-detection content="telephone=no"><meta name=apple-mobile-web-app-capable content=yes><meta name=viewport content="width=device-width,initial-scale=1,user-scalable=no"><script src=http://res.wx.qq.com/open/js/jweixin-1.2.0.js></script><script type=text/javascript src=cordova.js></script><title>光明</title></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.ad72cfdf70bd6f7519e0.js></script><script type=text/javascript src=/static/js/vendor.10d164ea32522da5baa8.js></script><script type=text/javascript src=/static/js/app.c7a55afb3489f2936469.js></script></body></html>
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=format-detection content="telephone=no"><meta name=apple-mobile-web-app-capable content=yes><meta name=viewport content="width=device-width,initial-scale=1,user-scalable=no"><script src=http://res.wx.qq.com/open/js/jweixin-1.2.0.js></script><script type=text/javascript src=cordova.js></script><title>光明</title><link href=./static/css/app.8a609bb43d209cc82aa99bdb491d437c.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.2359ce705dfe3b3fe1f6.js></script><script type=text/javascript src=./static/js/vendor.10d164ea32522da5baa8.js></script><script type=text/javascript src=./static/js/app.7c593ed001824fde90a4.js></script></body></html>

+ 68 - 0
platforms/android/assets/www/plugins/cordova-plugin-app-version/www/AppVersionPlugin.js

@@ -0,0 +1,68 @@
+cordova.define("cordova-plugin-app-version.AppVersionPlugin", function(require, exports, module) {
+/*jslint indent: 2 */
+/*global window, jQuery, angular, cordova */
+"use strict";
+
+// Returns a jQuery or AngularJS deferred object, or pass a success and fail callbacks if you don't want to use jQuery or AngularJS
+var getPromisedCordovaExec = function (command, success, fail) {
+  var toReturn, deferred, injector, $q;
+  if (success === undefined) {
+    if (window.jQuery) {
+      deferred = jQuery.Deferred();
+      success = deferred.resolve;
+      fail = deferred.reject;
+      toReturn = deferred;
+    } else if (window.angular) {
+      injector = angular.injector(["ng"]);
+      $q = injector.get("$q");
+      deferred = $q.defer();
+      success = deferred.resolve;
+      fail = deferred.reject;
+      toReturn = deferred.promise;
+    } else if (window.when && window.when.promise) {
+      deferred = when.defer();
+      success = deferred.resolve;
+      fail = deferred.reject;
+      toReturn = deferred.promise;
+    } else if (window.Promise) {
+      toReturn = new Promise(function(c, e) {
+        success = c;
+        fail = e;
+      });
+    } else if (window.WinJS && window.WinJS.Promise) {
+      toReturn = new WinJS.Promise(function(c, e) {
+        success = c;
+        fail = e;
+      });
+    } else {
+      return console.error('AppVersion either needs a success callback, or jQuery/AngularJS/Promise/WinJS.Promise defined for using promises');
+    }
+  }
+  // 5th param is NOT optional. must be at least empty array
+  cordova.exec(success, fail, "AppVersion", command, []);
+  return toReturn;
+};
+
+var getAppVersion = function (success, fail) {
+  return getPromisedCordovaExec('getVersionNumber', success, fail);
+};
+
+getAppVersion.getAppName = function (success, fail) {
+  return getPromisedCordovaExec('getAppName', success, fail);
+};
+
+getAppVersion.getPackageName = function (success, fail) {
+  return getPromisedCordovaExec('getPackageName', success, fail);
+};
+
+getAppVersion.getVersionNumber = function (success, fail) {
+  return getPromisedCordovaExec('getVersionNumber', success, fail);
+};
+
+getAppVersion.getVersionCode = function (success, fail) {
+  return getPromisedCordovaExec('getVersionCode', success, fail);
+};
+
+module.exports = getAppVersion;
+
+});

+ 86 - 0
platforms/android/assets/www/plugins/cordova-plugin-device/www/device.js

@@ -0,0 +1,86 @@
+cordova.define("cordova-plugin-device.device", function(require, exports, module) {
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var argscheck = require('cordova/argscheck');
+var channel = require('cordova/channel');
+var utils = require('cordova/utils');
+var exec = require('cordova/exec');
+var cordova = require('cordova');
+
+channel.createSticky('onCordovaInfoReady');
+// Tell cordova channel to wait on the CordovaInfoReady event
+channel.waitForInitialization('onCordovaInfoReady');
+
+/**
+ * This represents the mobile device, and provides properties for inspecting the model, version, UUID of the
+ * phone, etc.
+ * @constructor
+ */
+function Device () {
+    this.available = false;
+    this.platform = null;
+    this.version = null;
+    this.uuid = null;
+    this.cordova = null;
+    this.model = null;
+    this.manufacturer = null;
+    this.isVirtual = null;
+    this.serial = null;
+
+    var me = this;
+
+    channel.onCordovaReady.subscribe(function () {
+        me.getInfo(function (info) {
+            // ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js
+            // TODO: CB-5105 native implementations should not return info.cordova
+            var buildLabel = cordova.version;
+            me.available = true;
+            me.platform = info.platform;
+            me.version = info.version;
+            me.uuid = info.uuid;
+            me.cordova = buildLabel;
+            me.model = info.model;
+            me.isVirtual = info.isVirtual;
+            me.manufacturer = info.manufacturer || 'unknown';
+            me.serial = info.serial || 'unknown';
+            channel.onCordovaInfoReady.fire();
+        }, function (e) {
+            me.available = false;
+            utils.alert('[ERROR] Error initializing Cordova: ' + e);
+        });
+    });
+}
+
+/**
+ * Get device info
+ *
+ * @param {Function} successCallback The function to call when the heading data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the heading data. (OPTIONAL)
+ */
+Device.prototype.getInfo = function (successCallback, errorCallback) {
+    argscheck.checkArgs('fF', 'Device.getInfo', arguments);
+    exec(successCallback, errorCallback, 'Device', 'getDeviceInfo', []);
+};
+
+module.exports = new Device();
+
+});

Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/css/app.8a609bb43d209cc82aa99bdb491d437c.css


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/0.0a521feed5ffbaf371fd.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/0.e0e9326384e1b8113845.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/1.0657414e4256754bd077.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/1.6d8572b24b8692f9aa4b.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/10.50b8da3e75db2fb62b5e.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/10.5f750dc57999946c3ba0.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/11.c3f97213f3f1eca08a45.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/11.e4ea82d753359216c82d.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/12.1795a6d5363094cc3545.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/12.2c370262457040d6fb87.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/13.3f4e5921be3ba84e1768.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/13.7423fd4dafa430862b39.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/14.01c34bfa32ed507e0b5f.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/14.11caa2ec8b35ee899318.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/15.47a4f51f575b4b82f49d.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/15.bbe22a7900fd98aa2553.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/16.b751445e966564cdaebe.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/16.f0688362e88f736a9380.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/17.dca2f339fe20befab429.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/17.ebb4b0b0dd306c995c6c.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/18.89e72677fc6a7e0a077b.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/18.f2827a71fde6bde3ce7f.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/19.882f4ca7a8f245404e76.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/19.b98579c92ab7e6aa9111.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/2.a58a581b946368e4fdd4.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/2.a9a49519b70e450ba991.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/20.543ec1973297b395ae4a.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/20.e8e7388bb8497ac5227a.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/21.80dded26ae9df5f98ddb.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/21.ce05eb475224945fa3d7.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/22.324e6777a22bcd1db05c.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/22.5b809336c4c3767e5737.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/23.adbd3f4af4a05bbec2cd.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/23.eb67462fa27bea54e4d0.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/3.23eb6c06cc68424664c5.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/3.adaf17bd566554b347e5.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/4.1e49c835122c453a3245.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/4.6f172a9eedb509c25635.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/5.32db8aa955c95d784ff0.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/5.b847d20e34bfb8b429f8.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/6.5a60e1d2040b5a229acb.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/6.afa83d774d2d8956cfb1.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/7.27d85ae2c89c18af7032.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/7.741b1d4e3b176fe08c43.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/8.633a0bc06ae6adcdec64.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/8.b8ec1c93e6db3a9e0475.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/9.305e1052b9c04aa7b639.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/9.4e12652920a3fd1bbb24.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/app.7c593ed001824fde90a4.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/app.c7a55afb3489f2936469.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/manifest.2359ce705dfe3b3fe1f6.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/android/assets/www/static/js/manifest.ad72cfdf70bd6f7519e0.js


+ 6 - 7
platforms/android/build.gradle

@@ -178,7 +178,7 @@ android {
     }
 
     lintOptions {
-        abortOnError false;
+      abortOnError false;
     }
 
     compileSdkVersion cdvCompileSdkVersion
@@ -187,13 +187,13 @@ android {
     if (Boolean.valueOf(cdvBuildMultipleApks)) {
         productFlavors {
             armv7 {
-                versionCode defaultConfig.versionCode * 10 + 2
+                versionCode defaultConfig.versionCode*10 + 2
                 ndk {
                     abiFilters "armeabi-v7a", ""
                 }
             }
             x86 {
-                versionCode defaultConfig.versionCode * 10 + 4
+                versionCode defaultConfig.versionCode*10 + 4
                 ndk {
                     abiFilters "x86", ""
                 }
@@ -232,8 +232,7 @@ android {
             release {
                 // These must be set or Gradle will complain (even if they are overridden).
                 keyAlias = ""
-                keyPassword = "__unset"
-                // And these must be set to non-empty in order to have the signing step added to the task graph.
+                keyPassword = "__unset" // And these must be set to non-empty in order to have the signing step added to the task graph.
                 storeFile = null
                 storePassword = "__unset"
             }
@@ -251,15 +250,15 @@ android {
 }
 
 dependencies {
-    compile fileTree(dir: 'libs', include: '*.jar', exclude: 'com.zebra.*')
+    compile fileTree(dir: 'libs', include: '*.jar')
     // SUB-PROJECT DEPENDENCIES START
     debugCompile(project(path: "CordovaLib", configuration: "debug"))
     releaseCompile(project(path: "CordovaLib", configuration: "release"))
     compile "com.android.support:support-v4:24.1.1+"
+    compile "com.google.code.gson:gson:2.8.2"
     compile "com.yanzhenjie:permission:1.1.2"
     compile "com.squareup.retrofit2:retrofit:2.3.0"
     compile "com.squareup.retrofit2:converter-gson:2.3.0"
-    compile "com.google.code.gson:gson:2.8.2"
     // SUB-PROJECT DEPENDENCIES END
 }
 

+ 0 - 18
platforms/android/cordova-plugin-handheld/milk-handheld.gradle

@@ -1,18 +0,0 @@
-## Project-wide Gradle settings.
-#
-# 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: -Xmx1024m -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
-#Mon Jan 22 14:14:30 CST 2018
-systemProp.http.proxyHost=127.0.0.1
-systemProp.http.nonProxyHosts=localhost,192.168.*,127.*
-systemProp.http.proxyPort=1086

+ 58 - 40
platforms/android/libs/ModuleAPI_Android_3.0.1.0.jar

@@ -1,32 +1,11 @@
 cordova.define('cordova/plugin_list', function(require, exports, module) {
 module.exports = [
   {
-    "id": "cordova-plugin-splashscreen.SplashScreen",
-    "file": "plugins/cordova-plugin-splashscreen/www/splashscreen.js",
-    "pluginId": "cordova-plugin-splashscreen",
-    "clobbers": [
-      "navigator.splashscreen"
-    ]
-  },
-  {
-    "id": "cordova-plugin-x-toast.Toast",
-    "file": "plugins/cordova-plugin-x-toast/www/Toast.js",
-    "pluginId": "cordova-plugin-x-toast",
-    "clobbers": [
-      "window.plugins.toast"
-    ]
-  },
-  {
-    "id": "cordova-plugin-x-toast.tests",
-    "file": "plugins/cordova-plugin-x-toast/test/tests.js",
-    "pluginId": "cordova-plugin-x-toast"
-  },
-  {
-    "id": "cordova-plugin-pgyer.pgyer",
-    "file": "plugins/cordova-plugin-pgyer/www/pgyer.js",
-    "pluginId": "cordova-plugin-pgyer",
+    "id": "cordova-plugin-app-version.AppVersionPlugin",
+    "file": "plugins/cordova-plugin-app-version/www/AppVersionPlugin.js",
+    "pluginId": "cordova-plugin-app-version",
     "clobbers": [
-      "cordova.plugins.pgyer"
+      "cordova.getAppVersion"
     ]
   },
   {
@@ -62,11 +41,19 @@ module.exports = [
     ]
   },
   {
-    "id": "cordova-plugin-tencent-bg-location.tencentBgLocation",
-    "file": "plugins/cordova-plugin-tencent-bg-location/www/tencentBgLocation.js",
-    "pluginId": "cordova-plugin-tencent-bg-location",
+    "id": "cordova-plugin-device.device",
+    "file": "plugins/cordova-plugin-device/www/device.js",
+    "pluginId": "cordova-plugin-device",
     "clobbers": [
-      "tencentBgLocation"
+      "device"
+    ]
+  },
+  {
+    "id": "cordova-plugin-handheld.Handheld",
+    "file": "plugins/cordova-plugin-handheld/www/Handheld.js",
+    "pluginId": "cordova-plugin-handheld",
+    "clobbers": [
+      "Handheld"
     ]
   },
   {
@@ -78,27 +65,58 @@ module.exports = [
     ]
   },
   {
-    "id": "cordova-plugin-handheld.Handheld",
-    "file": "plugins/cordova-plugin-handheld/www/Handheld.js",
-    "pluginId": "cordova-plugin-handheld",
+    "id": "cordova-plugin-pgyer.pgyer",
+    "file": "plugins/cordova-plugin-pgyer/www/pgyer.js",
+    "pluginId": "cordova-plugin-pgyer",
     "clobbers": [
-      "Handheld"
+      "cordova.plugins.pgyer"
+    ]
+  },
+  {
+    "id": "cordova-plugin-splashscreen.SplashScreen",
+    "file": "plugins/cordova-plugin-splashscreen/www/splashscreen.js",
+    "pluginId": "cordova-plugin-splashscreen",
+    "clobbers": [
+      "navigator.splashscreen"
+    ]
+  },
+  {
+    "id": "cordova-plugin-tencent-bg-location.tencentBgLocation",
+    "file": "plugins/cordova-plugin-tencent-bg-location/www/tencentBgLocation.js",
+    "pluginId": "cordova-plugin-tencent-bg-location",
+    "clobbers": [
+      "tencentBgLocation"
+    ]
+  },
+  {
+    "id": "cordova-plugin-x-toast.Toast",
+    "file": "plugins/cordova-plugin-x-toast/www/Toast.js",
+    "pluginId": "cordova-plugin-x-toast",
+    "clobbers": [
+      "window.plugins.toast"
     ]
+  },
+  {
+    "id": "cordova-plugin-x-toast.tests",
+    "file": "plugins/cordova-plugin-x-toast/test/tests.js",
+    "pluginId": "cordova-plugin-x-toast"
   }
 ];
 module.exports.metadata = 
 // TOP OF METADATA
 {
-  "cordova-plugin-whitelist": "1.3.3",
-  "cordova-plugin-splashscreen": "5.0.1",
-  "cordova-plugin-x-toast": "2.6.0",
-  "cordova-plugin-pgyer": "1.0.0",
-  "cordova-plugin-wkwebview-engine": "1.1.4",
+  "cordova-plugin-app-version": "0.1.9",
   "cordova-plugin-camera": "4.0.2",
-  "cordova-plugin-tencent-bg-location": "1.0.0",
+  "cordova-plugin-device": "2.0.2",
+  "cordova-plugin-handheld": "1.0.0",
   "cordova-plugin-navigationbar": "1.0.0",
+  "cordova-plugin-pgyer": "1.0.0",
   "cordova-plugin-remote-injection": "0.5.2",
-  "cordova-plugin-handheld": "1.0.0"
+  "cordova-plugin-splashscreen": "5.0.1",
+  "cordova-plugin-tencent-bg-location": "1.0.0",
+  "cordova-plugin-whitelist": "1.3.3",
+  "cordova-plugin-wkwebview-engine": "1.1.4",
+  "cordova-plugin-x-toast": "2.6.0"
 };
 // BOTTOM OF METADATA
 });

+ 68 - 0
platforms/android/platform_www/plugins/cordova-plugin-app-version/www/AppVersionPlugin.js

@@ -0,0 +1,68 @@
+cordova.define("cordova-plugin-app-version.AppVersionPlugin", function(require, exports, module) {
+/*jslint indent: 2 */
+/*global window, jQuery, angular, cordova */
+"use strict";
+
+// Returns a jQuery or AngularJS deferred object, or pass a success and fail callbacks if you don't want to use jQuery or AngularJS
+var getPromisedCordovaExec = function (command, success, fail) {
+  var toReturn, deferred, injector, $q;
+  if (success === undefined) {
+    if (window.jQuery) {
+      deferred = jQuery.Deferred();
+      success = deferred.resolve;
+      fail = deferred.reject;
+      toReturn = deferred;
+    } else if (window.angular) {
+      injector = angular.injector(["ng"]);
+      $q = injector.get("$q");
+      deferred = $q.defer();
+      success = deferred.resolve;
+      fail = deferred.reject;
+      toReturn = deferred.promise;
+    } else if (window.when && window.when.promise) {
+      deferred = when.defer();
+      success = deferred.resolve;
+      fail = deferred.reject;
+      toReturn = deferred.promise;
+    } else if (window.Promise) {
+      toReturn = new Promise(function(c, e) {
+        success = c;
+        fail = e;
+      });
+    } else if (window.WinJS && window.WinJS.Promise) {
+      toReturn = new WinJS.Promise(function(c, e) {
+        success = c;
+        fail = e;
+      });
+    } else {
+      return console.error('AppVersion either needs a success callback, or jQuery/AngularJS/Promise/WinJS.Promise defined for using promises');
+    }
+  }
+  // 5th param is NOT optional. must be at least empty array
+  cordova.exec(success, fail, "AppVersion", command, []);
+  return toReturn;
+};
+
+var getAppVersion = function (success, fail) {
+  return getPromisedCordovaExec('getVersionNumber', success, fail);
+};
+
+getAppVersion.getAppName = function (success, fail) {
+  return getPromisedCordovaExec('getAppName', success, fail);
+};
+
+getAppVersion.getPackageName = function (success, fail) {
+  return getPromisedCordovaExec('getPackageName', success, fail);
+};
+
+getAppVersion.getVersionNumber = function (success, fail) {
+  return getPromisedCordovaExec('getVersionNumber', success, fail);
+};
+
+getAppVersion.getVersionCode = function (success, fail) {
+  return getPromisedCordovaExec('getVersionCode', success, fail);
+};
+
+module.exports = getAppVersion;
+
+});

+ 86 - 0
platforms/android/platform_www/plugins/cordova-plugin-device/www/device.js

@@ -0,0 +1,86 @@
+cordova.define("cordova-plugin-device.device", function(require, exports, module) {
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var argscheck = require('cordova/argscheck');
+var channel = require('cordova/channel');
+var utils = require('cordova/utils');
+var exec = require('cordova/exec');
+var cordova = require('cordova');
+
+channel.createSticky('onCordovaInfoReady');
+// Tell cordova channel to wait on the CordovaInfoReady event
+channel.waitForInitialization('onCordovaInfoReady');
+
+/**
+ * This represents the mobile device, and provides properties for inspecting the model, version, UUID of the
+ * phone, etc.
+ * @constructor
+ */
+function Device () {
+    this.available = false;
+    this.platform = null;
+    this.version = null;
+    this.uuid = null;
+    this.cordova = null;
+    this.model = null;
+    this.manufacturer = null;
+    this.isVirtual = null;
+    this.serial = null;
+
+    var me = this;
+
+    channel.onCordovaReady.subscribe(function () {
+        me.getInfo(function (info) {
+            // ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js
+            // TODO: CB-5105 native implementations should not return info.cordova
+            var buildLabel = cordova.version;
+            me.available = true;
+            me.platform = info.platform;
+            me.version = info.version;
+            me.uuid = info.uuid;
+            me.cordova = buildLabel;
+            me.model = info.model;
+            me.isVirtual = info.isVirtual;
+            me.manufacturer = info.manufacturer || 'unknown';
+            me.serial = info.serial || 'unknown';
+            channel.onCordovaInfoReady.fire();
+        }, function (e) {
+            me.available = false;
+            utils.alert('[ERROR] Error initializing Cordova: ' + e);
+        });
+    });
+}
+
+/**
+ * Get device info
+ *
+ * @param {Function} successCallback The function to call when the heading data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the heading data. (OPTIONAL)
+ */
+Device.prototype.getInfo = function (successCallback, errorCallback) {
+    argscheck.checkArgs('fF', 'Device.getInfo', arguments);
+    exec(successCallback, errorCallback, 'Device', 'getDeviceInfo', []);
+};
+
+module.exports = new Device();
+
+});

+ 5 - 4
platforms/android/project.properties

@@ -13,8 +13,9 @@
 target=android-26
 android.library.reference.1=CordovaLib
 cordova.system.library.1=com.android.support:support-v4:24.1.1+
-cordova.system.library.2=com.yanzhenjie:permission:1.1.2
-cordova.system.library.3=com.squareup.retrofit2:retrofit:2.3.0
-cordova.system.library.4=com.squareup.retrofit2:converter-gson:2.3.0
 cordova.gradle.include.1=cordova-plugin-handheld/milk-handheld.gradle
-cordova.system.library.5=com.google.code.gson:gson:2.8.2
+cordova.system.library.2=com.google.code.gson:gson:2.8.2
+cordova.system.library.3=com.yanzhenjie:permission:1.1.2
+cordova.system.library.4=com.squareup.retrofit2:retrofit:2.3.0
+cordova.system.library.5=com.google.code.gson:gson:2.8.2
+cordova.system.library.6=com.squareup.retrofit2:converter-gson:2.3.0

+ 6 - 0
platforms/android/release-signing.properties

@@ -0,0 +1,6 @@
+# This file is automatically generated.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+key.store=../../zouma.jks
+key.alias=zouma
+key.store.password=zouma123
+key.alias.password=zouma123

+ 27 - 19
platforms/android/res/drawable-xhdpi/prev.png


+ 174 - 0
platforms/android/res/xml/provider_paths.xml

@@ -0,0 +1,174 @@
+/*
+       Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+*/
+package org.apache.cordova.device;
+
+import java.util.TimeZone;
+
+import org.apache.cordova.CordovaWebView;
+import org.apache.cordova.CallbackContext;
+import org.apache.cordova.CordovaPlugin;
+import org.apache.cordova.CordovaInterface;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import android.provider.Settings;
+
+public class Device extends CordovaPlugin {
+    public static final String TAG = "Device";
+
+    public static String platform;                            // Device OS
+    public static String uuid;                                // Device UUID
+
+    private static final String ANDROID_PLATFORM = "Android";
+    private static final String AMAZON_PLATFORM = "amazon-fireos";
+    private static final String AMAZON_DEVICE = "Amazon";
+
+    /**
+     * Constructor.
+     */
+    public Device() {
+    }
+
+    /**
+     * Sets the context of the Command. This can then be used to do things like
+     * get file paths associated with the Activity.
+     *
+     * @param cordova The context of the main Activity.
+     * @param webView The CordovaWebView Cordova is running in.
+     */
+    public void initialize(CordovaInterface cordova, CordovaWebView webView) {
+        super.initialize(cordova, webView);
+        Device.uuid = getUuid();
+    }
+
+    /**
+     * Executes the request and returns PluginResult.
+     *
+     * @param action            The action to execute.
+     * @param args              JSONArry of arguments for the plugin.
+     * @param callbackContext   The callback id used when calling back into JavaScript.
+     * @return                  True if the action was valid, false if not.
+     */
+    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
+        if ("getDeviceInfo".equals(action)) {
+            JSONObject r = new JSONObject();
+            r.put("uuid", Device.uuid);
+            r.put("version", this.getOSVersion());
+            r.put("platform", this.getPlatform());
+            r.put("model", this.getModel());
+            r.put("manufacturer", this.getManufacturer());
+	        r.put("isVirtual", this.isVirtual());
+            r.put("serial", this.getSerialNumber());
+            callbackContext.success(r);
+        }
+        else {
+            return false;
+        }
+        return true;
+    }
+
+    //--------------------------------------------------------------------------
+    // LOCAL METHODS
+    //--------------------------------------------------------------------------
+
+    /**
+     * Get the OS name.
+     *
+     * @return
+     */
+    public String getPlatform() {
+        String platform;
+        if (isAmazonDevice()) {
+            platform = AMAZON_PLATFORM;
+        } else {
+            platform = ANDROID_PLATFORM;
+        }
+        return platform;
+    }
+
+    /**
+     * Get the device's Universally Unique Identifier (UUID).
+     *
+     * @return
+     */
+    public String getUuid() {
+        String uuid = Settings.Secure.getString(this.cordova.getActivity().getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
+        return uuid;
+    }
+
+    public String getModel() {
+        String model = android.os.Build.MODEL;
+        return model;
+    }
+
+    public String getProductName() {
+        String productname = android.os.Build.PRODUCT;
+        return productname;
+    }
+
+    public String getManufacturer() {
+        String manufacturer = android.os.Build.MANUFACTURER;
+        return manufacturer;
+    }
+
+    public String getSerialNumber() {
+        String serial = android.os.Build.SERIAL;
+        return serial;
+    }
+
+    /**
+     * Get the OS version.
+     *
+     * @return
+     */
+    public String getOSVersion() {
+        String osversion = android.os.Build.VERSION.RELEASE;
+        return osversion;
+    }
+
+    public String getSDKVersion() {
+        @SuppressWarnings("deprecation")
+        String sdkversion = android.os.Build.VERSION.SDK;
+        return sdkversion;
+    }
+
+    public String getTimeZoneID() {
+        TimeZone tz = TimeZone.getDefault();
+        return (tz.getID());
+    }
+
+    /**
+     * Function to check if the device is manufactured by Amazon
+     *
+     * @return
+     */
+    public boolean isAmazonDevice() {
+        if (android.os.Build.MANUFACTURER.equals(AMAZON_DEVICE)) {
+            return true;
+        }
+        return false;
+    }
+
+    public boolean isVirtual() {
+	return android.os.Build.FINGERPRINT.contains("generic") ||
+	    android.os.Build.PRODUCT.contains("sdk");
+    }
+
+}

+ 45 - 0
platforms/android/src/org/apache/cordova/splashscreen/SplashScreen.java

@@ -0,0 +1,45 @@
+package uk.co.whiteoctober.cordova;
+
+import org.apache.cordova.CordovaPlugin;
+import org.apache.cordova.CallbackContext;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.pm.PackageManager;
+
+public class AppVersion extends CordovaPlugin {
+  @Override
+  public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
+
+    try {
+      if (action.equals("getAppName")) {
+        PackageManager packageManager = this.cordova.getActivity().getPackageManager();
+        ApplicationInfo app = packageManager.getApplicationInfo(this.cordova.getActivity().getPackageName(), 0);
+        callbackContext.success((String)packageManager.getApplicationLabel(app));
+        return true;
+      }
+      if (action.equals("getPackageName")) {
+        callbackContext.success(this.cordova.getActivity().getPackageName());
+        return true;
+      }
+      if (action.equals("getVersionNumber")) {
+        PackageManager packageManager = this.cordova.getActivity().getPackageManager();
+        callbackContext.success(packageManager.getPackageInfo(this.cordova.getActivity().getPackageName(), 0).versionName);
+      return true;
+      }
+      if (action.equals("getVersionCode")) {
+        PackageManager packageManager = this.cordova.getActivity().getPackageManager();
+        callbackContext.success(packageManager.getPackageInfo(this.cordova.getActivity().getPackageName(), 0).versionCode);
+      return true;
+      }
+      return false;
+    } catch (NameNotFoundException e) {
+      callbackContext.success("N/A");
+      return true;
+    }
+  }
+
+}

+ 34 - 2
platforms/ios/.gitignore

@@ -10,7 +10,7 @@
           "CFBundleLocalizations": [
             {
               "xml": "<array><string>zh_CN</string></array>",
-              "count": 2
+              "count": 3
             }
           ],
           "NSCameraUsageDescription": [
@@ -79,6 +79,14 @@
             {
               "xml": "<feature name=\"Handheld\"><param name=\"ios-package\" value=\"Handheld\" /><param name=\"onload\" value=\"true\" /></feature>",
               "count": 1
+            },
+            {
+              "xml": "<feature name=\"Device\"><param name=\"ios-package\" value=\"CDVDevice\" /></feature>",
+              "count": 1
+            },
+            {
+              "xml": "<feature name=\"AppVersion\"><param name=\"ios-package\" value=\"AppVersion\" /></feature>",
+              "count": 1
             }
           ]
         }
@@ -117,6 +125,12 @@
     },
     "cordova-plugin-handheld": {
       "PACKAGE_NAME": "com.brightdairy.milk"
+    },
+    "cordova-plugin-device": {
+      "PACKAGE_NAME": "com.brightdairy.milk"
+    },
+    "cordova-plugin-app-version": {
+      "PACKAGE_NAME": "com.brightdairy.milk"
     }
   },
   "dependent_plugins": {},
@@ -221,6 +235,22 @@
       "clobbers": [
         "Handheld"
       ]
+    },
+    {
+      "id": "cordova-plugin-device.device",
+      "file": "plugins/cordova-plugin-device/www/device.js",
+      "pluginId": "cordova-plugin-device",
+      "clobbers": [
+        "device"
+      ]
+    },
+    {
+      "id": "cordova-plugin-app-version.AppVersionPlugin",
+      "file": "plugins/cordova-plugin-app-version/www/AppVersionPlugin.js",
+      "pluginId": "cordova-plugin-app-version",
+      "clobbers": [
+        "cordova.getAppVersion"
+      ]
     }
   ],
   "plugin_metadata": {
@@ -233,6 +263,8 @@
     "cordova-plugin-whitelist": "1.3.3",
     "cordova-plugin-wkwebview-engine": "1.1.4",
     "cordova-plugin-x-toast": "2.6.0",
-    "cordova-plugin-handheld": "1.0.0"
+    "cordova-plugin-handheld": "1.0.0",
+    "cordova-plugin-device": "2.0.2",
+    "cordova-plugin-app-version": "0.1.9"
   }
 }

+ 19 - 1
platforms/ios/platform_www/cordova-js-src/exec.js

@@ -100,6 +100,22 @@ module.exports = [
     "clobbers": [
       "Handheld"
     ]
+  },
+  {
+    "id": "cordova-plugin-device.device",
+    "file": "plugins/cordova-plugin-device/www/device.js",
+    "pluginId": "cordova-plugin-device",
+    "clobbers": [
+      "device"
+    ]
+  },
+  {
+    "id": "cordova-plugin-app-version.AppVersionPlugin",
+    "file": "plugins/cordova-plugin-app-version/www/AppVersionPlugin.js",
+    "pluginId": "cordova-plugin-app-version",
+    "clobbers": [
+      "cordova.getAppVersion"
+    ]
   }
 ];
 module.exports.metadata = 
@@ -114,7 +130,9 @@ module.exports.metadata =
   "cordova-plugin-whitelist": "1.3.3",
   "cordova-plugin-wkwebview-engine": "1.1.4",
   "cordova-plugin-x-toast": "2.6.0",
-  "cordova-plugin-handheld": "1.0.0"
+  "cordova-plugin-handheld": "1.0.0",
+  "cordova-plugin-device": "2.0.2",
+  "cordova-plugin-app-version": "0.1.9"
 };
 // BOTTOM OF METADATA
 });

+ 68 - 0
platforms/ios/platform_www/plugins/cordova-plugin-app-version/www/AppVersionPlugin.js

@@ -0,0 +1,68 @@
+cordova.define("cordova-plugin-app-version.AppVersionPlugin", function(require, exports, module) {
+/*jslint indent: 2 */
+/*global window, jQuery, angular, cordova */
+"use strict";
+
+// Returns a jQuery or AngularJS deferred object, or pass a success and fail callbacks if you don't want to use jQuery or AngularJS
+var getPromisedCordovaExec = function (command, success, fail) {
+  var toReturn, deferred, injector, $q;
+  if (success === undefined) {
+    if (window.jQuery) {
+      deferred = jQuery.Deferred();
+      success = deferred.resolve;
+      fail = deferred.reject;
+      toReturn = deferred;
+    } else if (window.angular) {
+      injector = angular.injector(["ng"]);
+      $q = injector.get("$q");
+      deferred = $q.defer();
+      success = deferred.resolve;
+      fail = deferred.reject;
+      toReturn = deferred.promise;
+    } else if (window.when && window.when.promise) {
+      deferred = when.defer();
+      success = deferred.resolve;
+      fail = deferred.reject;
+      toReturn = deferred.promise;
+    } else if (window.Promise) {
+      toReturn = new Promise(function(c, e) {
+        success = c;
+        fail = e;
+      });
+    } else if (window.WinJS && window.WinJS.Promise) {
+      toReturn = new WinJS.Promise(function(c, e) {
+        success = c;
+        fail = e;
+      });
+    } else {
+      return console.error('AppVersion either needs a success callback, or jQuery/AngularJS/Promise/WinJS.Promise defined for using promises');
+    }
+  }
+  // 5th param is NOT optional. must be at least empty array
+  cordova.exec(success, fail, "AppVersion", command, []);
+  return toReturn;
+};
+
+var getAppVersion = function (success, fail) {
+  return getPromisedCordovaExec('getVersionNumber', success, fail);
+};
+
+getAppVersion.getAppName = function (success, fail) {
+  return getPromisedCordovaExec('getAppName', success, fail);
+};
+
+getAppVersion.getPackageName = function (success, fail) {
+  return getPromisedCordovaExec('getPackageName', success, fail);
+};
+
+getAppVersion.getVersionNumber = function (success, fail) {
+  return getPromisedCordovaExec('getVersionNumber', success, fail);
+};
+
+getAppVersion.getVersionCode = function (success, fail) {
+  return getPromisedCordovaExec('getVersionCode', success, fail);
+};
+
+module.exports = getAppVersion;
+
+});

+ 86 - 0
platforms/ios/platform_www/plugins/cordova-plugin-camera/www/Camera.js

@@ -0,0 +1,86 @@
+cordova.define("cordova-plugin-device.device", function(require, exports, module) {
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var argscheck = require('cordova/argscheck');
+var channel = require('cordova/channel');
+var utils = require('cordova/utils');
+var exec = require('cordova/exec');
+var cordova = require('cordova');
+
+channel.createSticky('onCordovaInfoReady');
+// Tell cordova channel to wait on the CordovaInfoReady event
+channel.waitForInitialization('onCordovaInfoReady');
+
+/**
+ * This represents the mobile device, and provides properties for inspecting the model, version, UUID of the
+ * phone, etc.
+ * @constructor
+ */
+function Device () {
+    this.available = false;
+    this.platform = null;
+    this.version = null;
+    this.uuid = null;
+    this.cordova = null;
+    this.model = null;
+    this.manufacturer = null;
+    this.isVirtual = null;
+    this.serial = null;
+
+    var me = this;
+
+    channel.onCordovaReady.subscribe(function () {
+        me.getInfo(function (info) {
+            // ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js
+            // TODO: CB-5105 native implementations should not return info.cordova
+            var buildLabel = cordova.version;
+            me.available = true;
+            me.platform = info.platform;
+            me.version = info.version;
+            me.uuid = info.uuid;
+            me.cordova = buildLabel;
+            me.model = info.model;
+            me.isVirtual = info.isVirtual;
+            me.manufacturer = info.manufacturer || 'unknown';
+            me.serial = info.serial || 'unknown';
+            channel.onCordovaInfoReady.fire();
+        }, function (e) {
+            me.available = false;
+            utils.alert('[ERROR] Error initializing Cordova: ' + e);
+        });
+    });
+}
+
+/**
+ * Get device info
+ *
+ * @param {Function} successCallback The function to call when the heading data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the heading data. (OPTIONAL)
+ */
+Device.prototype.getInfo = function (successCallback, errorCallback) {
+    argscheck.checkArgs('fF', 'Device.getInfo', arguments);
+    exec(successCallback, errorCallback, 'Device', 'getDeviceInfo', []);
+};
+
+module.exports = new Device();
+
+});

+ 19 - 1
platforms/ios/platform_www/plugins/cordova-plugin-handheld/www/Handheld.js

@@ -100,6 +100,22 @@ module.exports = [
     "clobbers": [
       "Handheld"
     ]
+  },
+  {
+    "id": "cordova-plugin-device.device",
+    "file": "plugins/cordova-plugin-device/www/device.js",
+    "pluginId": "cordova-plugin-device",
+    "clobbers": [
+      "device"
+    ]
+  },
+  {
+    "id": "cordova-plugin-app-version.AppVersionPlugin",
+    "file": "plugins/cordova-plugin-app-version/www/AppVersionPlugin.js",
+    "pluginId": "cordova-plugin-app-version",
+    "clobbers": [
+      "cordova.getAppVersion"
+    ]
   }
 ];
 module.exports.metadata = 
@@ -114,7 +130,9 @@ module.exports.metadata =
   "cordova-plugin-whitelist": "1.3.3",
   "cordova-plugin-wkwebview-engine": "1.1.4",
   "cordova-plugin-x-toast": "2.6.0",
-  "cordova-plugin-handheld": "1.0.0"
+  "cordova-plugin-handheld": "1.0.0",
+  "cordova-plugin-device": "2.0.2",
+  "cordova-plugin-app-version": "0.1.9"
 };
 // BOTTOM OF METADATA
 });

+ 1 - 1
platforms/ios/www/index.html

@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=format-detection content="telephone=no"><meta name=apple-mobile-web-app-capable content=yes><meta name=viewport content="width=device-width,initial-scale=1,user-scalable=no"><script src=http://res.wx.qq.com/open/js/jweixin-1.2.0.js></script><script type=text/javascript src=cordova.js></script><title>光明</title></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.ad72cfdf70bd6f7519e0.js></script><script type=text/javascript src=/static/js/vendor.10d164ea32522da5baa8.js></script><script type=text/javascript src=/static/js/app.c7a55afb3489f2936469.js></script></body></html>
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=format-detection content="telephone=no"><meta name=apple-mobile-web-app-capable content=yes><meta name=viewport content="width=device-width,initial-scale=1,user-scalable=no"><script src=http://res.wx.qq.com/open/js/jweixin-1.2.0.js></script><script type=text/javascript src=cordova.js></script><title>光明</title></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.6b310e4e7932a21c08e8.js></script><script type=text/javascript src=/static/js/vendor.10d164ea32522da5baa8.js></script><script type=text/javascript src=/static/js/app.ed94e6659f9d09fa9168.js></script></body></html>

+ 68 - 0
platforms/ios/www/plugins/cordova-plugin-app-version/www/AppVersionPlugin.js

@@ -0,0 +1,68 @@
+cordova.define("cordova-plugin-app-version.AppVersionPlugin", function(require, exports, module) {
+/*jslint indent: 2 */
+/*global window, jQuery, angular, cordova */
+"use strict";
+
+// Returns a jQuery or AngularJS deferred object, or pass a success and fail callbacks if you don't want to use jQuery or AngularJS
+var getPromisedCordovaExec = function (command, success, fail) {
+  var toReturn, deferred, injector, $q;
+  if (success === undefined) {
+    if (window.jQuery) {
+      deferred = jQuery.Deferred();
+      success = deferred.resolve;
+      fail = deferred.reject;
+      toReturn = deferred;
+    } else if (window.angular) {
+      injector = angular.injector(["ng"]);
+      $q = injector.get("$q");
+      deferred = $q.defer();
+      success = deferred.resolve;
+      fail = deferred.reject;
+      toReturn = deferred.promise;
+    } else if (window.when && window.when.promise) {
+      deferred = when.defer();
+      success = deferred.resolve;
+      fail = deferred.reject;
+      toReturn = deferred.promise;
+    } else if (window.Promise) {
+      toReturn = new Promise(function(c, e) {
+        success = c;
+        fail = e;
+      });
+    } else if (window.WinJS && window.WinJS.Promise) {
+      toReturn = new WinJS.Promise(function(c, e) {
+        success = c;
+        fail = e;
+      });
+    } else {
+      return console.error('AppVersion either needs a success callback, or jQuery/AngularJS/Promise/WinJS.Promise defined for using promises');
+    }
+  }
+  // 5th param is NOT optional. must be at least empty array
+  cordova.exec(success, fail, "AppVersion", command, []);
+  return toReturn;
+};
+
+var getAppVersion = function (success, fail) {
+  return getPromisedCordovaExec('getVersionNumber', success, fail);
+};
+
+getAppVersion.getAppName = function (success, fail) {
+  return getPromisedCordovaExec('getAppName', success, fail);
+};
+
+getAppVersion.getPackageName = function (success, fail) {
+  return getPromisedCordovaExec('getPackageName', success, fail);
+};
+
+getAppVersion.getVersionNumber = function (success, fail) {
+  return getPromisedCordovaExec('getVersionNumber', success, fail);
+};
+
+getAppVersion.getVersionCode = function (success, fail) {
+  return getPromisedCordovaExec('getVersionCode', success, fail);
+};
+
+module.exports = getAppVersion;
+
+});

+ 86 - 0
platforms/ios/www/plugins/cordova-plugin-camera/www/Camera.js

@@ -0,0 +1,86 @@
+cordova.define("cordova-plugin-device.device", function(require, exports, module) {
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var argscheck = require('cordova/argscheck');
+var channel = require('cordova/channel');
+var utils = require('cordova/utils');
+var exec = require('cordova/exec');
+var cordova = require('cordova');
+
+channel.createSticky('onCordovaInfoReady');
+// Tell cordova channel to wait on the CordovaInfoReady event
+channel.waitForInitialization('onCordovaInfoReady');
+
+/**
+ * This represents the mobile device, and provides properties for inspecting the model, version, UUID of the
+ * phone, etc.
+ * @constructor
+ */
+function Device () {
+    this.available = false;
+    this.platform = null;
+    this.version = null;
+    this.uuid = null;
+    this.cordova = null;
+    this.model = null;
+    this.manufacturer = null;
+    this.isVirtual = null;
+    this.serial = null;
+
+    var me = this;
+
+    channel.onCordovaReady.subscribe(function () {
+        me.getInfo(function (info) {
+            // ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js
+            // TODO: CB-5105 native implementations should not return info.cordova
+            var buildLabel = cordova.version;
+            me.available = true;
+            me.platform = info.platform;
+            me.version = info.version;
+            me.uuid = info.uuid;
+            me.cordova = buildLabel;
+            me.model = info.model;
+            me.isVirtual = info.isVirtual;
+            me.manufacturer = info.manufacturer || 'unknown';
+            me.serial = info.serial || 'unknown';
+            channel.onCordovaInfoReady.fire();
+        }, function (e) {
+            me.available = false;
+            utils.alert('[ERROR] Error initializing Cordova: ' + e);
+        });
+    });
+}
+
+/**
+ * Get device info
+ *
+ * @param {Function} successCallback The function to call when the heading data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the heading data. (OPTIONAL)
+ */
+Device.prototype.getInfo = function (successCallback, errorCallback) {
+    argscheck.checkArgs('fF', 'Device.getInfo', arguments);
+    exec(successCallback, errorCallback, 'Device', 'getDeviceInfo', []);
+};
+
+module.exports = new Device();
+
+});

Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/ios/www/plugins/cordova-plugin-handheld/www/Handheld.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/ios/www/static/js/15.fe27bd979199e3a368e5.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/ios/www/static/js/app.c7a55afb3489f2936469.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/ios/www/static/js/app.ed94e6659f9d09fa9168.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/ios/www/static/js/manifest.6b310e4e7932a21c08e8.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
platforms/ios/www/static/js/manifest.ad72cfdf70bd6f7519e0.js


+ 12 - 0
platforms/ios/奶源追溯.xcodeproj/project.pbxproj

@@ -47,6 +47,8 @@
 		7DE6683967294D41A96A1125 /* ScanViewController.h in Resources */ = {isa = PBXBuildFile; fileRef = B348E6F89301427EA89FC391 /* ScanViewController.h */; };
 		F868D1F5556F4C098B54B3AA /* ScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DFAC7D7CCC9C42B0A538E5A2 /* ScanViewController.m */; };
 		AB0E3EFDCFA94F528E9C17C6 /* qrCodeScanner.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 1A76CBBFB0A240A796A89205 /* qrCodeScanner.bundle */; };
+		5ED5B21EE31F40BB84641F39 /* CDVDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B2A757CF83440FC81ACA2A2 /* CDVDevice.m */; };
+		C3CF3B7BB1F84277B397C92C /* AppVersion.m in Sources */ = {isa = PBXBuildFile; fileRef = 91BF7C9AB28C4E7F955DEE7C /* AppVersion.m */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -133,6 +135,10 @@
 		B348E6F89301427EA89FC391 /* ScanViewController.h */ = {isa = PBXFileReference; name = "ScanViewController.h"; path = "cordova-plugin-handheld/ScanViewController.h"; sourceTree = "<group>"; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; };
 		DFAC7D7CCC9C42B0A538E5A2 /* ScanViewController.m */ = {isa = PBXFileReference; name = "ScanViewController.m"; path = "cordova-plugin-handheld/ScanViewController.m"; sourceTree = "<group>"; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; };
 		1A76CBBFB0A240A796A89205 /* qrCodeScanner.bundle */ = {isa = PBXFileReference; name = "qrCodeScanner.bundle"; path = "qrCodeScanner.bundle"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.plug-in; explicitFileType = undefined; includeInIndex = 0; };
+		8B2A757CF83440FC81ACA2A2 /* CDVDevice.m */ = {isa = PBXFileReference; name = "CDVDevice.m"; path = "cordova-plugin-device/CDVDevice.m"; sourceTree = "<group>"; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; };
+		B6BD39A66E474D3A86476C60 /* CDVDevice.h */ = {isa = PBXFileReference; name = "CDVDevice.h"; path = "cordova-plugin-device/CDVDevice.h"; sourceTree = "<group>"; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; };
+		91BF7C9AB28C4E7F955DEE7C /* AppVersion.m */ = {isa = PBXFileReference; name = "AppVersion.m"; path = "cordova-plugin-app-version/AppVersion.m"; sourceTree = "<group>"; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; };
+		9440D188147F4424B45E2FD7 /* AppVersion.h */ = {isa = PBXFileReference; name = "AppVersion.h"; path = "cordova-plugin-app-version/AppVersion.h"; sourceTree = "<group>"; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -292,6 +298,10 @@
 				D109DC20B94F48EBBC201A0D /* Handheld.m */,
 				B348E6F89301427EA89FC391 /* ScanViewController.h */,
 				DFAC7D7CCC9C42B0A538E5A2 /* ScanViewController.m */,
+				8B2A757CF83440FC81ACA2A2 /* CDVDevice.m */,
+				B6BD39A66E474D3A86476C60 /* CDVDevice.h */,
+				91BF7C9AB28C4E7F955DEE7C /* AppVersion.m */,
+				9440D188147F4424B45E2FD7 /* AppVersion.h */,
 			);
 			name = Plugins;
 			path = "奶源追溯/Plugins";
@@ -425,6 +435,8 @@
 				F9023DAE5B8A4FF69BB34B9A /* Handheld.m in Sources */,
 				7DE6683967294D41A96A1125 /* ScanViewController.h in Resources */,
 				F868D1F5556F4C098B54B3AA /* ScanViewController.m in Sources */,
+				5ED5B21EE31F40BB84641F39 /* CDVDevice.m in Sources */,
+				C3CF3B7BB1F84277B397C92C /* AppVersion.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

+ 13 - 0
platforms/ios/奶源追溯.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,13 @@
+#import <Cordova/CDVPlugin.h>
+
+@interface AppVersion : CDVPlugin
+
+- (void)getAppName:(CDVInvokedUrlCommand*)command;
+
+- (void)getPackageName:(CDVInvokedUrlCommand*)command;
+
+- (void)getVersionNumber:(CDVInvokedUrlCommand*)command;
+
+- (void)getVersionCode:(CDVInvokedUrlCommand*)command;
+
+@end

+ 47 - 0
platforms/ios/奶源追溯/Plugins/cordova-plugin-app-version/AppVersion.m

@@ -0,0 +1,47 @@
+#import "AppVersion.h"
+#import <Cordova/CDVPluginResult.h>
+
+@implementation AppVersion
+
+- (void)getAppName : (CDVInvokedUrlCommand *)command
+{
+    NSString * callbackId = command.callbackId;
+    NSString * version =[[[NSBundle mainBundle]infoDictionary]objectForKey :@"CFBundleDisplayName"];
+    CDVPluginResult * pluginResult =[CDVPluginResult resultWithStatus : CDVCommandStatus_OK messageAsString : version];
+    [self.commandDelegate sendPluginResult : pluginResult callbackId : callbackId];
+}
+
+- (void)getPackageName:(CDVInvokedUrlCommand*)command
+{
+    NSString* callbackId = command.callbackId;
+    NSString* packageName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"];
+    CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:packageName];
+    [self.commandDelegate sendPluginResult:pluginResult callbackId:callbackId];
+}
+
+- (void)getVersionNumber:(CDVInvokedUrlCommand*)command
+{
+    NSString* callbackId = command.callbackId;
+    NSString* version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
+    if (version == nil) {
+      NSLog(@"CFBundleShortVersionString was nil, attempting CFBundleVersion");
+      version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
+      if (version == nil) {
+        NSLog(@"CFBundleVersion was also nil, giving up");
+        // not calling error callback here to maintain backward compatibility
+      }
+    }
+
+    CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:version];
+    [self.commandDelegate sendPluginResult:pluginResult callbackId:callbackId];
+}
+
+- (void)getVersionCode:(CDVInvokedUrlCommand*)command
+{
+    NSString* callbackId = command.callbackId;
+    NSString* version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
+    CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:version];
+    [self.commandDelegate sendPluginResult:pluginResult callbackId:callbackId];
+}
+
+@end

+ 30 - 0
platforms/ios/奶源追溯/Plugins/cordova-plugin-camera/CDVCamera.h

@@ -0,0 +1,30 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <UIKit/UIKit.h>
+#import <Cordova/CDVPlugin.h>
+
+@interface CDVDevice : CDVPlugin
+{}
+
++ (NSString*)cordovaVersion;
+
+- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command;
+
+@end

Деякі файли не було показано, через те що забагато файлів було змінено