Bladeren bron

uniapp原生Android版插件项目初始化

weizhengliang 6 maanden geleden
commit
07d0625c3b
100 gewijzigde bestanden met toevoegingen van 4930 en 0 verwijderingen
  1. 11 0
      .gitignore
  2. 101 0
      app/build.gradle
  3. BIN
      app/libs/android-gif-drawable-1.2.28.aar
  4. BIN
      app/libs/breakpad-build-release.aar
  5. BIN
      app/libs/lib.5plus.base-release.aar
  6. BIN
      app/libs/oaid_sdk_1.0.25.aar
  7. BIN
      app/libs/uniapp-v8-release.aar
  8. BIN
      app/libs/utsplugin-release.aar
  9. 149 0
      app/proguard-rules.pro
  10. 90 0
      app/src/main/AndroidManifest.xml
  11. 1 0
      app/src/main/assets/apps/__UNI__E/www/__uniappchooselocation.js
  12. 1 0
      app/src/main/assets/apps/__UNI__E/www/__uniappes6.js
  13. 1 0
      app/src/main/assets/apps/__UNI__E/www/__uniappopenlocation.js
  14. 1 0
      app/src/main/assets/apps/__UNI__E/www/__uniapppicker.js
  15. 8 0
      app/src/main/assets/apps/__UNI__E/www/__uniappquill.js
  16. 1 0
      app/src/main/assets/apps/__UNI__E/www/__uniappquillimageresize.js
  17. 1 0
      app/src/main/assets/apps/__UNI__E/www/__uniappscan.js
  18. BIN
      app/src/main/assets/apps/__UNI__E/www/__uniappsuccess.png
  19. 28 0
      app/src/main/assets/apps/__UNI__E/www/__uniappview.html
  20. 6 0
      app/src/main/assets/apps/__UNI__E/www/app-config-service.js
  21. 1 0
      app/src/main/assets/apps/__UNI__E/www/app-config.js
  22. 1 0
      app/src/main/assets/apps/__UNI__E/www/app-service.js
  23. 1 0
      app/src/main/assets/apps/__UNI__E/www/app-view.js
  24. 1 0
      app/src/main/assets/apps/__UNI__E/www/manifest.json
  25. 1 0
      app/src/main/assets/apps/__UNI__E/www/pages/sample/ext-component.js
  26. 1 0
      app/src/main/assets/apps/__UNI__E/www/pages/sample/ext-module.js
  27. BIN
      app/src/main/assets/apps/__UNI__E/www/static/logo.png
  28. 169 0
      app/src/main/assets/apps/__UNI__E/www/static/new_file.json
  29. 1 0
      app/src/main/assets/apps/__UNI__E/www/view.css
  30. 6 0
      app/src/main/assets/apps/__UNI__E/www/view.umd.min.js
  31. 5 0
      app/src/main/assets/data/dcloud_control.xml
  32. 92 0
      app/src/main/assets/data/dcloud_error.html
  33. 74 0
      app/src/main/assets/data/dcloud_properties.xml
  34. 50 0
      app/src/main/assets/dcloud_uniplugins.json
  35. BIN
      app/src/main/res/drawable-xxhdpi/icon.png
  36. BIN
      app/src/main/res/drawable-xxhdpi/push.png
  37. BIN
      app/src/main/res/drawable-xxhdpi/splash.png
  38. 3 0
      app/src/main/res/values/strings.xml
  39. BIN
      app/test.jks
  40. 29 0
      build.gradle
  41. 17 0
      gradle.properties
  42. BIN
      gradle/wrapper/gradle-wrapper.jar
  43. 6 0
      gradle/wrapper/gradle-wrapper.properties
  44. 172 0
      gradlew
  45. 84 0
      gradlew.bat
  46. 8 0
      settings.gradle
  47. 1 0
      test_module/.gitignore
  48. 38 0
      test_module/build.gradle
  49. 21 0
      test_module/proguard-rules.pro
  50. 26 0
      test_module/src/androidTest/java/com/wzl/test_module/ExampleInstrumentedTest.java
  51. 29 0
      test_module/src/main/AndroidManifest.xml
  52. 527 0
      test_module/src/main/java/com/wzl/test_module/MainActivity.java
  53. 30 0
      test_module/src/main/res/drawable-v24/ic_launcher_foreground.xml
  54. 170 0
      test_module/src/main/res/drawable/ic_launcher_background.xml
  55. 97 0
      test_module/src/main/res/layout/activity_main.xml
  56. 5 0
      test_module/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
  57. 5 0
      test_module/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
  58. BIN
      test_module/src/main/res/mipmap-hdpi/ic_launcher.png
  59. BIN
      test_module/src/main/res/mipmap-hdpi/ic_launcher_round.png
  60. BIN
      test_module/src/main/res/mipmap-mdpi/ic_launcher.png
  61. BIN
      test_module/src/main/res/mipmap-mdpi/ic_launcher_round.png
  62. BIN
      test_module/src/main/res/mipmap-xhdpi/ic_launcher.png
  63. BIN
      test_module/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  64. BIN
      test_module/src/main/res/mipmap-xxhdpi/ic_launcher.png
  65. BIN
      test_module/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  66. BIN
      test_module/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  67. BIN
      test_module/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  68. 16 0
      test_module/src/main/res/values-night/themes.xml
  69. 10 0
      test_module/src/main/res/values/colors.xml
  70. 3 0
      test_module/src/main/res/values/strings.xml
  71. 16 0
      test_module/src/main/res/values/themes.xml
  72. 17 0
      test_module/src/test/java/com/wzl/test_module/ExampleUnitTest.java
  73. BIN
      uniapp示例工程源码/unipluginDemo.rar
  74. 20 0
      uniapp示例工程源码/unipluginDemo/.hbuilderx/launch.json
  75. 18 0
      uniapp示例工程源码/unipluginDemo/App.vue
  76. 53 0
      uniapp示例工程源码/unipluginDemo/common/nvue.css
  77. 181 0
      uniapp示例工程源码/unipluginDemo/common/uni-nvue.css
  78. 1706 0
      uniapp示例工程源码/unipluginDemo/common/uni.css
  79. 73 0
      uniapp示例工程源码/unipluginDemo/common/util.js
  80. 11 0
      uniapp示例工程源码/unipluginDemo/main.js
  81. 101 0
      uniapp示例工程源码/unipluginDemo/manifest.json
  82. BIN
      uniapp示例工程源码/unipluginDemo/nativeplugins/uniplugin_camera/android/uniplugin_camera-release.aar
  83. 46 0
      uniapp示例工程源码/unipluginDemo/nativeplugins/uniplugin_camera/package.json
  84. 50 0
      uniapp示例工程源码/unipluginDemo/pages.json
  85. 84 0
      uniapp示例工程源码/unipluginDemo/pages/index/index.vue
  86. 76 0
      uniapp示例工程源码/unipluginDemo/pages/sample/ext-component.nvue
  87. 53 0
      uniapp示例工程源码/unipluginDemo/pages/sample/ext-module.nvue
  88. 112 0
      uniapp示例工程源码/unipluginDemo/pages/sample/richAlert.vue
  89. 31 0
      uniapp示例工程源码/unipluginDemo/pages/sample/uts_toast.vue
  90. BIN
      uniapp示例工程源码/unipluginDemo/static/logo.png
  91. 76 0
      uniapp示例工程源码/unipluginDemo/uni.scss
  92. 0 0
      uniapp示例工程源码/unipluginDemo/uni_modules/uts-toast/changelog.md
  93. 82 0
      uniapp示例工程源码/unipluginDemo/uni_modules/uts-toast/package.json
  94. 6 0
      uniapp示例工程源码/unipluginDemo/uni_modules/uts-toast/readme.md
  95. 3 0
      uniapp示例工程源码/unipluginDemo/uni_modules/uts-toast/utssdk/app-android/config.json
  96. 11 0
      uniapp示例工程源码/unipluginDemo/uni_modules/uts-toast/utssdk/app-android/index.uts
  97. 5 0
      uniapp示例工程源码/unipluginDemo/uni_modules/uts-toast/utssdk/interface.uts
  98. BIN
      uniapp示例工程源码/unipluginDemo/unpackage/cache/app-android/uts/uni_modules/uts-toast/classes.dex
  99. BIN
      uniapp示例工程源码/unipluginDemo/unpackage/cache/app-android/uts/uni_modules/uts-toast/index.jar
  100. 0 0
      uniapp示例工程源码/unipluginDemo/unpackage/cache/app-android/uts/uni_modules/uts-toast/index.kt.map

+ 11 - 0
.gitignore

@@ -0,0 +1,11 @@
+*.iml
+.gradle
+/local.properties
+/.idea/caches/build_file_checksums.ser
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+.DS_Store
+/build
+/captures
+.externalNativeBuild

+ 101 - 0
app/build.gradle

@@ -0,0 +1,101 @@
+apply plugin: 'com.android.application'
+
+android {
+    compileSdkVersion 30
+    buildToolsVersion '30.0.3'
+
+    namespace 'com.android.UniPlugin'
+    defaultConfig {
+        applicationId "com.android.UniPlugin"
+        minSdkVersion 21
+        targetSdkVersion 28 //建议此属性值设为21 io.dcloud.PandoraEntry 作为apk入口时   必须设置 targetSDKVersion>=21 沉浸式才生效
+
+        versionCode 1
+        versionName "1.0"
+        multiDexEnabled true
+        ndk {
+            abiFilters 'x86','armeabi-v7a'
+        }
+        compileOptions {
+            sourceCompatibility JavaVersion.VERSION_1_8
+            targetCompatibility JavaVersion.VERSION_1_8
+        }
+    }
+
+    signingConfigs {
+        config {
+            keyAlias 'key0'
+            keyPassword '123456'
+            storeFile file('test.jks')
+            storePassword '123456'
+            v1SigningEnabled true
+            v2SigningEnabled true
+        }
+    }
+
+    buildTypes {
+        release {
+            signingConfig signingConfigs.config
+            zipAlignEnabled false
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+        }
+        debug {
+            signingConfig signingConfigs.config
+            zipAlignEnabled false
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+        }
+    }
+    //使用uniapp时,需复制下面代码
+    /*代码开始*/
+    aaptOptions {
+        additionalParameters '--auto-add-overlay'
+        //noCompress 'foo', 'bar'
+        ignoreAssetsPattern "!.svn:!.git:.*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~"
+    }
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_8
+        targetCompatibility JavaVersion.VERSION_1_8
+    }
+    /*代码结束*/
+}
+repositories {
+    flatDir {
+        dirs 'libs'
+    }
+}
+dependencies {
+    implementation fileTree(dir: 'libs', include: ['*.jar'])
+    implementation fileTree(dir: 'libs', include: ['*.aar'])
+
+    /*uniapp所需库-----------------------开始*/
+    implementation 'androidx.recyclerview:recyclerview:1.1.0'
+    implementation 'com.facebook.fresco:fresco:1.13.0'
+    implementation "com.facebook.fresco:animated-gif:1.13.0"
+    /*uniapp所需库-----------------------结束*/
+    // 基座需要,必须添加
+    implementation 'com.github.bumptech.glide:glide:4.9.0'
+    implementation 'com.alibaba:fastjson:1.2.83'
+    implementation 'androidx.webkit:webkit:1.3.0'
+    implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
+    implementation 'androidx.core:core:1.1.0'
+    implementation "androidx.fragment:fragment:1.1.0"
+    implementation 'androidx.appcompat:appcompat:1.1.0'
+    // 添加uni-app插件
+    implementation project(':uniplugin_component')
+    implementation project(':uniplugin_module')
+    implementation project(':uniplugin_richalert')
+    // uts原生插件
+    implementation project(':uts-toast')
+    // uts依赖
+    implementation "com.squareup.okhttp3:okhttp:3.12.12"
+    implementation "androidx.core:core-ktx:1.6.0"
+    implementation "org.jetbrains.kotlin:kotlin-stdlib:1.8.10"
+    implementation "org.jetbrains.kotlin:kotlin-reflect:1.6.0"
+    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8"
+    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.8"
+    implementation "com.github.getActivity:XXPermissions:18.0"
+
+    implementation project(':test_module')
+}

BIN
app/libs/android-gif-drawable-1.2.28.aar


BIN
app/libs/breakpad-build-release.aar


BIN
app/libs/lib.5plus.base-release.aar


BIN
app/libs/oaid_sdk_1.0.25.aar


BIN
app/libs/uniapp-v8-release.aar


BIN
app/libs/utsplugin-release.aar


+ 149 - 0
app/proguard-rules.pro

@@ -0,0 +1,149 @@
+-optimizationpasses 5
+-dontusemixedcaseclassnames
+-dontskipnonpubliclibraryclasses
+-dontpreverify
+-verbose
+
+#-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
+-dontoptimize
+
+-keep public class * extends android.app.Activity
+-keep public class * extends android.app.Application
+-keep public class * extends android.app.Service
+-keep public class * extends android.content.BroadcastReceiver
+-keep public class * extends android.content.ContentProvider
+-keep public class * extends android.app.backup.BackupAgentHelper
+-keep public class * extends android.preference.Preference
+-keep public class * extends io.dcloud.common.DHInterface.IPlugin
+-keep public class * extends io.dcloud.common.DHInterface.IFeature
+-keep public class * extends io.dcloud.common.DHInterface.IBoot
+-keep public class * extends io.dcloud.common.DHInterface.IReflectAble
+
+-keep class io.dcloud.feature.speech.** {*;}
+-keep class io.dcloud.net.** {*;}
+-keep class io.dcloud.common.constant.** {*;}
+-keep class io.dcloud.common.sonic.** {*;}
+-keep class io.dcloud.common.DHInterface.** {*;}
+-keep class io.dcloud.common.util.** {*;}
+-keep class io.dcloud.common.adapter.** {*;}
+-keep class io.dcloud.feature.internal.reflect.** {*;}
+-keep class io.dcloud.feature.internal.sdk.** {*;}
+-keep class io.dcloud.feature.payment.** {*;}
+-keep class io.dcloud.sdk.** {*;}
+-keep class com.** {*;}
+-keep class io.dcloud.nineoldandroids.** {*;}
+-keep class vi.com.gdi.** {*;}
+-keep class androidx.** {*;}
+-dontwarn pl.droidsonroids.gif.**
+
+-keepclasseswithmembers class * extends io.dcloud.js.geolocation.GeoManagerBase {
+    <methods>;
+}
+
+-keep class io.dcloud.share.AbsWebviewClient
+-keepclasseswithmembers class io.dcloud.share.AbsWebviewClient {
+    <methods>;
+}
+
+-keep class io.dcloud.share.ShareAuthorizeView
+-keepclasseswithmembers class io.dcloud.share.ShareAuthorizeView {
+    <methods>;
+}
+-keep class io.dcloud.share.IFShareApi
+-keep public class * extends io.dcloud.share.IFShareApi
+-keepclasseswithmembers class io.dcloud.share.IFShareApi {
+    <methods>;
+}
+
+
+
+
+-keepattributes Exceptions,InnerClasses,Signature,Deprecated, SourceFile,LineNumberTable,*Annotation*,EnclosingMethod
+-keep class io.dcloud.appstream.StreamAppManager
+-keepclasseswithmembers class io.dcloud.appstream.StreamAppManager {
+    public protected <methods>;
+}
+
+-keep class io.dcloud.common.DHInterface.IReflectAble
+-keep public class * extends io.dcloud.common.DHInterface.IReflectAble{
+  public protected <methods>;
+  public protected *;
+}
+-keep class **.R
+-keep class **.R$* {
+    public static <fields>;
+}
+-keep public class * extends io.dcloud.common.DHInterface.IJsInterface{
+  public protected <methods>;
+  public protected *;
+}
+
+-keepclasseswithmembers class io.dcloud.EntryProxy {
+    <methods>;
+}
+
+-keep class * implements android.os.IInterface {
+  <methods>;
+}
+
+-keepclasseswithmembers class *{
+  public static java.lang.String getJsContent();
+}
+-keepclasseswithmembers class io.dcloud.appstream.StreamAppScriptEntry {
+    <methods>;
+}
+-keepclasseswithmembers class *{
+	public static void onReceiver1(android.content.Intent, android.content.Context);
+}
+
+-keepclasseswithmembers class *{
+  public static io.dcloud.share.AbsWebviewClient getWebviewClient(io.dcloud.share.ShareAuthorizeView);
+}
+-keepclasseswithmembers class *{
+	public java.lang.String exec(java.lang.String,java.lang.String,java.lang.String[]);
+}
+-keepattributes Exceptions,InnerClasses,Signature,Deprecated, SourceFile,LineNumberTable,*Annotation*,EnclosingMethod
+
+-keepclasseswithmembers class * {
+    public <init>(android.content.Context, android.util.AttributeSet);
+}
+
+-keepclasseswithmembers class * {
+    public <init>(android.content.Context, android.util.AttributeSet, int);
+}
+
+-keep public class * extends android.app.Application{
+  public static <methods>;
+  public *;
+}
+
+-keepclassmembers class * extends android.app.Activity {
+   public void *(android.view.View);
+   public static <methods>;
+}
+
+-keepclassmembers enum * {
+    public static **[] values();
+    public static ** valueOf(java.lang.String);
+}
+
+-keep class * implements android.os.Parcelable {
+  public static final android.os.Parcelable$Creator *;
+}
+
+-keepattributes Signature
+-keep class io.dcloud.encryption.K {*;}
+-dontwarn com.igexin.**
+-keep class org.json.** { *; }
+-dontwarn com.amap.**
+-dontwarn org.apache.commons.**
+-dontwarn com.sina.weibo.sdk.**
+
+
+-keep class uni.** {*;}
+-keep class pl.** {*;}
+-keep class io.** {*;}
+-keep class org.mozilla.**{*;}
+
+-keep class androidtranscoder.**{*;}
+-keep class XI.**{*;}

+ 90 - 0
app/src/main/AndroidManifest.xml

@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools">
+
+    <supports-screens
+        android:anyDensity="true"
+        android:largeScreens="true"
+        android:normalScreens="true"
+        android:resizeable="true"
+        android:smallScreens="true" />
+
+    <!-- Barcode(二维码)  begin -->
+    <uses-permission android:name="android.permission.CAMERA" />
+    <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.VIBRATE" />
+    <uses-permission android:name="android.permission.FLASHLIGHT" />
+    <!-- Barcode(二维码)  end -->
+
+    <application
+        android:name="io.dcloud.application.DCloudApplication"
+        android:allowClearUserData="true"
+        android:icon="@drawable/icon"
+        android:label="@string/app_name"
+        android:largeHeap="true"
+        android:supportsRtl="true">
+
+        <!-- 应用入口 -->
+        <!--<activity
+            android:name="io.dcloud.PandoraEntry"
+            android:theme="@style/TranslucentTheme"
+            android:configChanges="orientation|keyboardHidden|screenSize|mcc|mnc|fontScale"
+            android:hardwareAccelerated="true"
+            android:exported="true"
+            android:windowSoftInputMode="adjustResize">
+            <intent-filter>
+                <data android:scheme="hbuilder"/>
+                <action android:name="android.intent.action.VIEW"/>
+
+                <category android:name="android.intent.category.DEFAULT"/>
+                <category android:name="android.intent.category.BROWSABLE"/>
+            </intent-filter>
+            <intent-filter>
+                <data android:mimeType="image/*"/>
+                <action android:name="android.intent.action.SEND"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+            </intent-filter>
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
+            </intent-filter>
+        </activity>
+        <meta-data android:name="dcloud_uninview_background"
+            android:value="true"/>-->
+
+        <!--<activity
+            android:name="io.dcloud.PandoraEntryActivity"
+            android:launchMode="singleTask"
+            android:configChanges="orientation|keyboardHidden|screenSize|mcc|mnc|fontScale|keyboard|smallestScreenSize|screenLayout|screenSize|uiMode"
+            android:hardwareAccelerated="true"
+            android:permission="com.miui.securitycenter.permission.AppPermissionsEditor"
+            android:screenOrientation="user"
+            android:theme="@style/DCloudTheme"
+            android:exported="true"
+            android:windowSoftInputMode="adjustResize">
+
+            <intent-filter>
+
+                <category
+                    android:name="android.intent.category.DEFAULT" />
+
+                <category
+                    android:name="android.intent.category.BROWSABLE" />
+
+                <action
+                    android:name="android.intent.action.VIEW" />
+
+                <data
+                    android:scheme=" " />
+            </intent-filter>
+        </activity>-->
+        <meta-data
+            android:name="dcloud_appkey"
+            android:value="__UNI__040AC90" />
+    </application>
+
+</manifest>

File diff suppressed because it is too large
+ 1 - 0
app/src/main/assets/apps/__UNI__E/www/__uniappchooselocation.js


File diff suppressed because it is too large
+ 1 - 0
app/src/main/assets/apps/__UNI__E/www/__uniappes6.js


File diff suppressed because it is too large
+ 1 - 0
app/src/main/assets/apps/__UNI__E/www/__uniappopenlocation.js


File diff suppressed because it is too large
+ 1 - 0
app/src/main/assets/apps/__UNI__E/www/__uniapppicker.js


File diff suppressed because it is too large
+ 8 - 0
app/src/main/assets/apps/__UNI__E/www/__uniappquill.js


File diff suppressed because it is too large
+ 1 - 0
app/src/main/assets/apps/__UNI__E/www/__uniappquillimageresize.js


File diff suppressed because it is too large
+ 1 - 0
app/src/main/assets/apps/__UNI__E/www/__uniappscan.js


BIN
app/src/main/assets/apps/__UNI__E/www/__uniappsuccess.png


+ 28 - 0
app/src/main/assets/apps/__UNI__E/www/__uniappview.html

@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+
+  <head>
+    <meta charset="UTF-8" />
+    <script>
+      var __UniViewStartTime__ = Date.now();
+      document.addEventListener('DOMContentLoaded', function() {
+          document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
+      })
+      var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
+        CSS.supports('top: constant(a)'))
+      document.write(
+        '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
+        (coverSupport ? ', viewport-fit=cover' : '') + '" />')
+    </script>
+    <title>View</title>
+    <link rel="stylesheet" href="view.css" />
+  </head>
+
+  <body>
+    <div id="app"></div>
+    <script src="__uniappes6.js"></script>
+    <script src="view.umd.min.js"></script>
+    <script src="app-view.js"></script>
+  </body>
+
+</html>

File diff suppressed because it is too large
+ 6 - 0
app/src/main/assets/apps/__UNI__E/www/app-config-service.js


File diff suppressed because it is too large
+ 1 - 0
app/src/main/assets/apps/__UNI__E/www/app-config.js


File diff suppressed because it is too large
+ 1 - 0
app/src/main/assets/apps/__UNI__E/www/app-service.js


File diff suppressed because it is too large
+ 1 - 0
app/src/main/assets/apps/__UNI__E/www/app-view.js


File diff suppressed because it is too large
+ 1 - 0
app/src/main/assets/apps/__UNI__E/www/manifest.json


File diff suppressed because it is too large
+ 1 - 0
app/src/main/assets/apps/__UNI__E/www/pages/sample/ext-component.js


File diff suppressed because it is too large
+ 1 - 0
app/src/main/assets/apps/__UNI__E/www/pages/sample/ext-module.js


BIN
app/src/main/assets/apps/__UNI__E/www/static/logo.png


+ 169 - 0
app/src/main/assets/apps/__UNI__E/www/static/new_file.json

@@ -0,0 +1,169 @@
+{
+	"id": "__UNI__09EF501",
+	"name": "掌上喵",
+	"version": {
+		"name": "1.4.40",
+		"code": 1440
+	},
+	"description": "",
+	"launch_path": "__uniappview.html",
+	"developer": {
+		"name": "",
+		"email": "",
+		"url": ""
+	},
+	"permissions": {
+		"OAuth": {
+			"description": "OAuth"
+		},
+		"Share": {
+			"description": "plus.share.*"
+		},
+		"VideoPlayer": {
+			"description": "VideoPlayer"
+		},
+		"Push": {
+			"description": "Push"
+		},
+		"UniNView": {
+			"description": "UniNView"
+		},
+		"Stream": {
+			"description": "plus.stream.*"
+		},
+		"Confusion": {
+			"description": "Resource confusion"
+		},
+		"Audio": {
+			"description": "plus.audio.*"
+		},
+		"Accelerometer": {
+			"description": "plus.accelerometer.*"
+		},
+		"Barcode": {
+			"description": "plus.barcode.*"
+		},
+		"Cache": {
+			"description": "plus.cache.*"
+		},
+		"Camera": {
+			"description": "plus.camera.*"
+		},
+		"Console": {
+			"description": "plus.console.*"
+		},
+		"Device": {
+			"description": "plus.device.*"
+		},
+		"Downloader": {
+			"description": "plus.downloader.*"
+		},
+		"File": {
+			"description": "plus.io.*"
+		},
+		"Gallery": {
+			"description": "plus.gallery.*"
+		},
+		"Geolocation": {
+			"description": "plus.geolocation.*"
+		},
+		"Invocation": {
+			"description": "plus.android.*"
+		},
+		"NativeObj": {
+			"description": "plus.nativeObj.*"
+		},
+		"NativeUI": {
+			"description": "plus.nativeUI.*"
+		},
+		"Navigator": {
+			"description": "plus.navigator.*"
+		},
+		"Orientation": {
+			"description": "plus.orientation.*"
+		},
+		"Proximity": {
+			"description": "plus.proximity.*"
+		},
+		"Runtime": {
+			"description": "plus.runtime.*"
+		},
+		"Storage": {
+			"description": "plus.storage.*"
+		},
+		"Uploader": {
+			"description": "plus.uploader.*"
+		},
+		"Webview": {
+			"description": "plus.webview.*"
+		},
+		"XMLHttpRequest": {
+			"description": "plus.net.*"
+		},
+		"Zip": {
+			"description": "plus.zip.*"
+		}
+	},
+	"plus": {
+		"useragent": {
+			"value": "uni-app",
+			"concatenate": true
+		},
+		"splashscreen": {
+			"target": "id:1",
+			"autoclose": true,
+			"waiting": false,
+			"delay": 0
+		},
+		"popGesture": "close",
+		"launchwebview": {
+			"id": "1",
+			"kernel": "WKWebview",
+			"uni-app": "auto"
+		},
+		"statusbar": {
+			"immersed": "supportedDevice",
+			"style": "dark",
+			"background": "#F7F7F7"
+		},
+		"compatible": {
+			"ignoreVersion": true
+		},
+		"usingComponents": true,
+		"allowsInlineMediaPlayback": true,
+		"safearea": {
+			"background": "#ffffff",
+			"bottom": {
+				"offset": "auto"
+			}
+		},
+		"uni-app": {
+			"compilerVersion": "2.4.6",
+			"control": "v8",
+			"nvueCompiler": "uni-app",
+			"renderer": "auto",
+			"nvue": {
+				"flex-direction": "column"
+			}
+		},
+		"tabBar": {
+			"borderStyle": "rgba(0,0,0,0.4)",
+			"backgroundColor": "#ffffff",
+			"list": [{
+				"pagePath": "pages\/mall\/mall"
+			}, {
+				"pagePath": "pages\/navbar\/navbar"
+			}, {
+				"pagePath": "pages\/material\/material"
+			}, {
+				"pagePath": "pages\/my\/my"
+			}, {
+				"pagePath": "pages\/product\/rank"
+			}],
+			"selectedColor": "#0062cc",
+			"height": "50px"
+		},
+		"adid": "129854030308",
+		"channel": ""
+	}
+}

File diff suppressed because it is too large
+ 1 - 0
app/src/main/assets/apps/__UNI__E/www/view.css


File diff suppressed because it is too large
+ 6 - 0
app/src/main/assets/apps/__UNI__E/www/view.umd.min.js


+ 5 - 0
app/src/main/assets/data/dcloud_control.xml

@@ -0,0 +1,5 @@
+<hbuilder>
+<apps>
+    <app appid="__UNI__040AC90" appver=""/>
+</apps>
+</hbuilder>

+ 92 - 0
app/src/main/assets/data/dcloud_error.html

@@ -0,0 +1,92 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8"/>
+    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
+	<meta name="HandheldFriendly" content="true"/>
+	<meta name="MobileOptimized" content="320"/>
+	<title>Error</title>
+	<script type="text/javascript">
+// H5 plus事件处理
+var ws=null;
+function plusReady(){
+	// Android处理返回键
+	plus.key.addEventListener('backbutton',function(){
+		(history.length==1)&&ws.close();
+		var c=setTimeout(function(){
+			ws.close();
+		},1000);
+		window.onbeforeunload=function(){
+			clearTimeout(c);
+		}
+		history.go(-2);
+	},false);
+	ws=plus.webview.currentWebview();
+}
+if(window.plus){
+	plusReady();
+}else{
+	document.addEventListener('plusready',plusReady,false);
+}
+document.addEventListener('touchstart',function(){
+    return false;
+},true);
+// 禁止选择
+document.oncontextmenu=function(){
+	return false;
+};
+// 获取错误信息
+document.addEventListener("error",function(e){
+	info.innerText="请求的页面("+e.url+")无法打开";
+	console.log("请求的页面无法打开:"+e.href);
+},false);
+	</script>
+	<style>
+*{
+	-webkit-user-select: none;
+}
+html,body{
+	margin: 0px;
+	padding: 0px;
+	width: 100%;
+	height: 100%;
+	text-align: center;
+	word-break: break-all;
+	-webkit-touch-callout:none;
+	-webkit-tap-highlight-color:rgba(0,0,0,0);
+}
+.button{
+	width: 50%;
+	font-size: 18px;
+	font-weight: normal;
+	text-decoration: none;
+	text-align: center;
+	padding: .5em 0em;
+	margin: .5em auto;
+	color: #333333;
+	background-color: #EEEEEE;
+	border: 1px solid #CCCCCC;
+	-webkit-border-radius: 5px;
+	border-radius: 5px;
+}
+.button:active{
+	background-color: #CCCCCC;
+}
+	</style>
+</head>
+<body>
+	<div style="width:100%;height:20%;"></div>
+	<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 512 512" style="height:20%;width:30%"> 
+	<g id="icomoon-ignore">
+		<line stroke-width="1" x1="" y1="" x2="" y2="" stroke="#449FDB" opacity=""></line>
+	</g>
+	<path d="M256 0c-141.385 0-256 114.615-256 256s114.615 256 256 256 256-114.615 256-256-114.615-256-256-256zM352 128c17.673 0 32 14.327 32 32s-14.327 32-32 32-32-14.327-32-32 14.327-32 32-32zM160 128c17.673 0 32 14.327 32 32s-14.327 32-32 32-32-14.327-32-32 14.327-32 32-32zM352.049 390.37c-19.587-32.574-55.272-54.37-96.049-54.37s-76.462 21.796-96.049 54.37l-41.164-24.698c27.98-46.535 78.958-77.672 137.213-77.672s109.232 31.137 137.213 77.672l-41.164 24.698z" fill="#666666"></path>
+    </svg>
+	<p style="font-size:18px;font-weight:bolder;">We're sorry ...</p>
+	<p id="info" style="font-size:12px;"></p>
+	<!--<div class="button" onclick="history.back()">Retry</div>-->
+	<div class="button" onclick="if(history.length == 1){ws.close();}else{ws.back();ws.back();}">Back</div>
+	<div class="button" onclick="ws.close()">Close</div>
+	<div class="button" onclick="plus.runtime.restart()">Restart</div>
+</body>
+</html>

+ 74 - 0
app/src/main/assets/data/dcloud_properties.xml

@@ -0,0 +1,74 @@
+<properties>
+	<features>
+		<feature name="Barcode" value="io.dcloud.feature.barcode2.BarcodeFeatureImpl"/>
+        <feature name="Speech" value="io.dcloud.feature.speech.SpeechFeatureImpl">
+            <module name="iFly" value="io.dcloud.feature.speech.IflySpeechEngine"/>
+            <module name="baidu" value="io.dcloud.feature.speech.BaiduSpeechEngine"/>
+        </feature>
+		<feature name="Maps" value="io.dcloud.js.map.amap.JsMapPluginImpl"/>
+        <!--<feature name="Maps" value="io.dcloud.js.map.JsMapPluginImpl"/>-->
+		<feature name="Contacts" value="io.dcloud.feature.contacts.ContactsFeatureImpl"/>
+		<feature name="Messaging" value="io.dcloud.adapter.messaging.MessagingPluginImpl"/>
+		<feature name="Camera" value="io.dcloud.js.camera.CameraFeatureImpl"/>
+		<feature name="Console" value="io.dcloud.feature.pdr.LoggerFeatureImpl"/>
+		<feature name="Device" value="io.dcloud.feature.device.DeviceFeatureImpl"/>
+		<feature name="File" value="io.dcloud.js.file.FileFeatureImpl"/>
+		<feature name="Proximity" value="io.dcloud.feature.sensor.ProximityFeatureImpl"/>
+		<feature name="Storage" value="io.dcloud.feature.pdr.NStorageFeatureImpl"/>
+		<feature name="Cache" value="io.dcloud.feature.pdr.CoreCacheFeatureImpl"/>
+		<feature name="Invocation" value="io.dcloud.invocation.Invocation"/>
+		<feature name="Navigator" value="io.dcloud.feature.ui.navigator.NavigatorUIFeatureImpl"/>
+		<feature name="NativeUI" value="io.dcloud.feature.ui.nativeui.NativeUIFeatureImpl"/>
+		<feature name="UI" value="io.dcloud.feature.ui.UIFeatureImpl">
+			<module name="Navigator" value="io.dcloud.feature.ui.NavView"/>
+		</feature>
+		<feature name="Gallery" value="io.dcloud.js.gallery.GalleryFeatureImpl"/>
+		<feature name="Downloader" value="io.dcloud.net.DownloaderFeatureImpl"/>
+		<feature name="Uploader" value="io.dcloud.net.UploadFeature"/>
+		<feature name="Push" value="io.dcloud.feature.aps.APSFeatureImpl">
+			<module name="igexin" value="io.dcloud.feature.apsGt.GTPushService"/>
+			<!-- mkeypush -->
+		</feature>
+		<feature name="Zip" value="io.dcloud.feature.pdr.ZipFeature"/>
+		<feature name="Audio" value="io.dcloud.feature.audio.AudioFeatureImpl"/>
+		<feature name="Runtime" value="io.dcloud.feature.pdr.RuntimeFeatureImpl"/>
+        <feature name="VideoPlayer" value="io.dcloud.media.MediaFeatureImpl"/>
+        <feature name="LivePusher" value="io.dcloud.media.live.LiveMediaFeatureImpl"/>
+		<feature name="XMLHttpRequest" value="io.dcloud.net.XMLHttpRequestFeature"/>
+		<feature name="Statistic" value="io.dcloud.feature.statistics.StatisticsFeatureImpl"/>
+		<feature name="Accelerometer" value="io.dcloud.feature.sensor.AccelerometerFeatureImpl"/>
+		<feature name="Orientation" value="io.dcloud.feature.sensor.OrientationFeatureImpl"/>
+		<feature name="NativeObj" value="io.dcloud.feature.nativeObj.FeatureImpl"/>		
+		<feature name="Geolocation" value="io.dcloud.js.geolocation.GeolocationFeatureImpl"/>
+		<feature name="Payment" value="io.dcloud.feature.payment.PaymentFeatureImpl">
+			<module name="AliPay" value="io.dcloud.feature.payment.alipay.AliPay"/>
+			<module name="Payment-Weixin" value="io.dcloud.feature.payment.weixin.WeiXinPay"/>
+			<module name="Payment-Qihoo" value="io.dcloud.feature.payment.qihoopay.QihooPay"/>
+		</feature>
+		<feature name="Share" value="io.dcloud.share.ShareFeatureImpl">
+			<module name="Sina" value="io.dcloud.share.sina.SinaWeiboApiManager"/>
+			<module name="Tencent" value="io.dcloud.share.tencent.TencentWeiboApiManager"/>
+			<module name="Weixin" value="io.dcloud.share.mm.WeiXinApiManager"/>
+            <module name="QQ" value="io.dcloud.share.qq.QQApiManager"/>
+		</feature>
+		<feature name="OAuth" value="io.dcloud.feature.oauth.OAuthFeatureImpl">
+			<module name="OAuth-Weixin" value="io.dcloud.feature.oauth.weixin.WeiXinOAuthService"/>
+			<module name="OAuth-QQ" value="io.dcloud.feature.oauth.qq.QQOAuthService"/>
+			<module name="OAuth-Sina" value="io.dcloud.feature.oauth.sina.SinaOAuthService"/>
+			<module name="OAuth-Qihoo" value="io.dcloud.oauth.qihoo.QihooOAuthService"/>
+			<module name="OAuth-MiUi" value="io.dcloud.feature.oauth.miui.MiUiOAuthService"/>
+		</feature>
+		<feature name="Stream" value="io.dcloud.appstream.js.StreamAppFeatureImpl"/>
+		<feature name="Fingerprint" value="io.dcloud.feature.fingerprint.FingerPrintsImpl"/>
+		<feature name="iBeacon" value="io.dcloud.feature.iBeacon.WxBluetoothFeatureImpl"/>
+        <feature name="Bluetooth" value="io.dcloud.feature.bluetooth.BluetoothFeature"/>
+        <feature name="Sqlite" value="io.dcloud.feature.sqlite.DataBaseFeature"/>
+	</features>
+
+	<services>
+		<service name="push" value="io.dcloud.feature.aps.APSFeatureImpl"/>
+		<service name="Statistic" value="io.dcloud.feature.statistics.StatisticsBootImpl"/>
+		<service name="Downloader" value="io.dcloud.net.DownloaderBootImpl"/>
+		<!--<service name="Maps" value="io.dcloud.js.map.MapInitImpl"/>-->
+	</services>
+</properties>

+ 50 - 0
app/src/main/assets/dcloud_uniplugins.json

@@ -0,0 +1,50 @@
+{
+  "nativePlugins": [
+    {
+      "plugins": [
+        {
+          "type": "module",
+          "name": "TestModule",
+          "class": "io.dcloud.uniplugin.TestModule"
+        }
+      ]
+    },
+    {
+      "plugins": [
+        {
+          "type": "component",
+          "name": "myText",
+          "class": "io.dcloud.uniplugin.TestText"
+        }
+      ]
+    },
+    {
+      "plugins": [
+        {
+          "type": "component",
+          "name": "testText",
+          "class": "com.wdkl.uniplugin_camera.TestText"
+        }
+      ]
+    },
+    {
+      "plugins": [
+        {
+          "type": "component",
+          "name": "cameraPlugin",
+          "class": "com.wdkl.uniplugin_camera.CameraPlugin"
+        }
+      ]
+    },
+    {
+      "hooksClass": "",
+      "plugins": [
+        {
+          "type": "module",
+          "name": "DCloud-RichAlert",
+          "class": "uni.dcloud.io.uniplugin_richalert.RichAlertModule"
+        }
+      ]
+    }
+  ]
+}

BIN
app/src/main/res/drawable-xxhdpi/icon.png


BIN
app/src/main/res/drawable-xxhdpi/push.png


BIN
app/src/main/res/drawable-xxhdpi/splash.png


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

@@ -0,0 +1,3 @@
+<resources>
+    <string name="app_name">HBuilder-Integrate-AS</string>
+</resources>

BIN
app/test.jks


+ 29 - 0
build.gradle

@@ -0,0 +1,29 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+    
+    repositories {
+        google()
+        jcenter()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:4.2.2'
+        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0'
+
+
+        // NOTE: Do not place your application dependencies here; they belong
+        // in the individual module build.gradle files
+    }
+}
+
+allprojects {
+    repositories {
+        google()
+        jcenter()
+        maven { url = uri("https://jitpack.io") }
+    }
+}
+
+task clean(type: Delete) {
+    delete rootProject.buildDir
+}

+ 17 - 0
gradle.properties

@@ -0,0 +1,17 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+android.enableJetifier=true
+android.useAndroidX=true
+org.gradle.jvmargs=-Xmx4096m
+# 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
+
+

BIN
gradle/wrapper/gradle-wrapper.jar


+ 6 - 0
gradle/wrapper/gradle-wrapper.properties

@@ -0,0 +1,6 @@
+#Fri Dec 25 20:09:27 CST 2020
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-6.8.3-bin.zip

+ 172 - 0
gradlew

@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+    echo "$*"
+}
+
+die () {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+  NONSTOP* )
+    nonstop=true
+    ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Escape application args
+save () {
+    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+    echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+  cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"

+ 84 - 0
gradlew.bat

@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega

+ 8 - 0
settings.gradle

@@ -0,0 +1,8 @@
+include ':app'
+include ':uniplugin_module'
+include ':uniplugin_component'
+include ':uniplugin_richalert'
+include ':uts-toast'
+include ':test_module'
+include ':mylibrary'
+include ':uniplugin_camera'

+ 1 - 0
test_module/.gitignore

@@ -0,0 +1 @@
+/build

+ 38 - 0
test_module/build.gradle

@@ -0,0 +1,38 @@
+plugins {
+    id 'com.android.library'
+}
+
+android {
+    compileSdkVersion 30
+    buildToolsVersion "30.0.3"
+
+    defaultConfig {
+        minSdkVersion 21
+        targetSdkVersion 30
+        versionCode 1
+        versionName "1.0"
+
+        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+    }
+
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+        }
+    }
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_8
+        targetCompatibility JavaVersion.VERSION_1_8
+    }
+}
+
+dependencies {
+
+    implementation 'androidx.appcompat:appcompat:1.2.0'
+    implementation 'com.google.android.material:material:1.2.1'
+    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
+    testImplementation 'junit:junit:4.+'
+    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
+    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
+}

+ 21 - 0
test_module/proguard-rules.pro

@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile

+ 26 - 0
test_module/src/androidTest/java/com/wzl/test_module/ExampleInstrumentedTest.java

@@ -0,0 +1,26 @@
+package com.wzl.test_module;
+
+import android.content.Context;
+
+import androidx.test.platform.app.InstrumentationRegistry;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+    @Test
+    public void useAppContext() {
+        // Context of the app under test.
+        Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
+        assertEquals("com.wzl.test_module", appContext.getPackageName());
+    }
+}

+ 29 - 0
test_module/src/main/AndroidManifest.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.wzl.test_module">
+
+    <uses-permission android:name="android.permission.CAMERA" />
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.RECORD_AUDIO" />
+
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+
+    <uses-feature android:name="android.hardware.camera.autofocus" />
+
+    <application
+        android:allowBackup="true"
+        android:supportsRtl="true">
+        <activity android:name=".MainActivity"
+            android:theme="@style/Theme.UniPluginHelloAS">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>

+ 527 - 0
test_module/src/main/java/com/wzl/test_module/MainActivity.java

@@ -0,0 +1,527 @@
+package com.wzl.test_module;
+
+import androidx.annotation.NonNull;
+import androidx.appcompat.app.AppCompatActivity;
+
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.ImageFormat;
+import android.graphics.Matrix;
+import android.graphics.Rect;
+import android.graphics.YuvImage;
+import android.hardware.Camera;
+import android.media.CamcorderProfile;
+import android.media.MediaRecorder;
+import android.os.Bundle;
+import android.os.Environment;
+import android.util.DisplayMetrics;
+import android.util.Log;
+import android.view.Surface;
+import android.view.SurfaceHolder;
+import android.view.SurfaceView;
+import android.view.View;
+import android.widget.Button;
+
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.List;
+
+public class MainActivity extends AppCompatActivity implements View.OnClickListener {
+    private final static String TAG = "CameraTest";
+
+    private SurfaceView surfaceView;
+    private Button btnBack;
+    private Button btnShot;
+    private Button btnRecord;
+    private Button btnFlash;
+    private Button btnCameraSwitch;
+
+    private Camera mCamera;
+    private SurfaceHolder mHolder;
+    private MediaRecorder mediaRecorder;
+    private boolean recording = false;
+    private boolean lightOn = false;
+
+    /**
+     * 拍照id  1: 前摄像头  0:后摄像头
+     */
+    private int mCameraId = 0;
+
+    private int picWidth = 1080;
+    private int picHeight = 1920;
+    private int videoProfile = CamcorderProfile.QUALITY_720P; //默认720P
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+
+        surfaceView = findViewById(R.id.camera_surface_view);
+        btnBack = findViewById(R.id.iv_back);
+        btnShot = findViewById(R.id.img_camera);
+        btnRecord = findViewById(R.id.iv_record);
+        btnFlash = findViewById(R.id.camera_flash);
+        btnCameraSwitch = findViewById(R.id.camera_switch);
+
+        btnBack.setOnClickListener(this);
+        btnShot.setOnClickListener(this);
+        btnRecord.setOnClickListener(this);
+        btnFlash.setOnClickListener(this);
+        btnCameraSwitch.setOnClickListener(this);
+        surfaceView.setOnClickListener(this);
+
+        if (mCamera == null) {
+            mCamera = getCamera(mCameraId);
+        }
+
+        mHolder = surfaceView.getHolder();
+        mHolder.addCallback(new SurfaceHolder.Callback() {
+            @Override
+            public void surfaceCreated(@NonNull SurfaceHolder holder) {
+                //开启预览
+                if (mCamera != null) {
+                    startPreview(mCamera, holder);
+                }
+            }
+
+            @Override
+            public void surfaceChanged(@NonNull SurfaceHolder holder, int format, int width, int height) {
+                if (mCamera != null) {
+                    mCamera.stopPreview();
+                    startPreview(mCamera, holder);
+                }
+            }
+
+            @Override
+            public void surfaceDestroyed(@NonNull SurfaceHolder holder) {
+                releaseCamera();
+            }
+        });
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+
+        if (mCamera == null) {
+            mCamera = getCamera(mCameraId);
+            if (mHolder != null) {
+                startPreview(mCamera, mHolder);
+            }
+        }
+    }
+
+    @Override
+    protected void onDestroy() {
+        releaseCamera();
+
+        super.onDestroy();
+    }
+
+    @Override
+    public void onClick(View v) {
+        int id = v.getId();
+        if (id == R.id.iv_back) {
+            finish();
+        } else if (id == R.id.img_camera) {
+            takePhoto();
+        } else if (id == R.id.camera_switch) {
+            switchCamera();
+        } else if (id == R.id.camera_flash) {
+            switchFlashLight();
+        } else if (id == R.id.iv_record) {
+            recordVideo();
+        } else if (id == R.id.camera_surface_view) {
+            autoFocus();
+        }
+    }
+
+    private Camera getCamera(int id) {
+        Camera camera = null;
+        try {
+            camera = Camera.open(id);
+        } catch (Exception e) {
+            Log.e(TAG, "getCamera: " + e);
+        }
+        return camera;
+    }
+
+    private void releaseCamera() {
+        if (mCamera != null) {
+            mCamera.setPreviewCallback(null);
+            mCamera.stopPreview();
+            mCamera.release();
+            mCamera = null;
+        }
+    }
+
+    public void setPicSize(int width, int height) {
+        picHeight = height;
+        picWidth = width;
+    }
+
+    private void autoFocus() {
+        try {
+            if (mCamera != null) {
+                mCamera.cancelAutoFocus();
+                mCamera.getParameters().setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO);
+                mCamera.autoFocus(new Camera.AutoFocusCallback() {
+                    @Override
+                    public void onAutoFocus(boolean success, Camera camera) {
+                        //
+                    }
+                });
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    private void takePhoto() {
+        if (recording) {
+            Log.e(TAG, "Recording video busy...");
+        } else {
+            mCamera.takePicture(null, null, pictureCallback);
+        }
+    }
+
+    private final Camera.PictureCallback pictureCallback = new Camera.PictureCallback() {
+        @Override
+        public void onPictureTaken(final byte[] data, Camera camera) {
+            new Thread(new Runnable() {
+                @Override
+                public void run() {
+                    Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length);
+                    Bitmap saveBitmap = setTakePictureOrientation(mCameraId, bitmap);
+                    saveBitmap = Bitmap.createScaledBitmap(saveBitmap, picWidth, picHeight, true);
+                    String imgPath = getExternalFilesDir(Environment.DIRECTORY_DCIM).getPath() +
+                            File.separator + System.currentTimeMillis() + ".jpg";
+                    Log.e(TAG, "imgPath: ---  " + imgPath);
+
+                    saveJPGE_After(saveBitmap, imgPath, 100);
+                    if (!bitmap.isRecycled()) {
+                        bitmap.recycle();
+                    }
+                    if (!saveBitmap.isRecycled()) {
+                        saveBitmap.recycle();
+                    }
+                }
+            }).start();
+
+            if (mCamera != null) {
+                mCamera.stopPreview();
+                if (mHolder != null) {
+                    startPreview(mCamera, mHolder);
+                }
+            }
+        }
+    };
+
+    public boolean saveJPGE_After(Bitmap bitmap, String path, int quality) {
+        File file = new File(path);
+        makeDir(file);
+        try {
+            FileOutputStream out = new FileOutputStream(file);
+            if (bitmap.compress(Bitmap.CompressFormat.JPEG, quality, out)) {
+                out.flush();
+                out.close();
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+        return true;
+    }
+
+    private void makeDir(File file) {
+        File tempPath = new File(file.getParent());
+        if (!tempPath.exists()) {
+            tempPath.mkdirs();
+        }
+    }
+
+    public Bitmap setTakePictureOrientation(int id, Bitmap bitmap) {
+        Camera.CameraInfo info = new Camera.CameraInfo();
+        Camera.getCameraInfo(id, info);
+        bitmap = rotateImageView(id, info.orientation, bitmap);
+        return bitmap;
+    }
+
+    /**
+     * 把相机拍照返回照片转正
+     *
+     * @param angle 旋转角度
+     * @return bitmap 图片
+     */
+    private Bitmap rotateImageView(int id, int angle, Bitmap bitmap) {
+        //矩阵
+        Matrix matrix = new Matrix();
+        matrix.postRotate(angle);
+        //加入翻转 把相机拍照返回照片转正
+        if (id == 1) {
+            matrix.postScale(-1, 1);
+        }
+        // 创建新的图片
+        return Bitmap.createBitmap(bitmap, 0, 0,
+                bitmap.getWidth(), bitmap.getHeight(), matrix, true);
+    }
+
+    public void switchCamera() {
+        releaseCamera();
+        mCameraId = (mCameraId + 1) % Camera.getNumberOfCameras();
+        mCamera = getCamera(mCameraId);
+        if (mHolder != null) {
+            startPreview(mCamera, mHolder);
+        }
+    }
+
+    public void switchFlashLight() {
+        if (lightOn) {
+            turnLightOff();
+            lightOn = false;
+        } else {
+            turnLightOn();
+            lightOn = true;
+        }
+    }
+
+    public void turnLightOn() {
+        if (mCamera == null) {
+            return;
+        }
+        Camera.Parameters parameters = mCamera.getParameters();
+        if (parameters == null) {
+            return;
+        }
+        parameters.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH);//开启
+        mCamera.setParameters(parameters);
+    }
+
+    public void turnLightOff() {
+        if (mCamera == null) {
+            return;
+        }
+        Camera.Parameters parameters = mCamera.getParameters();
+        if (parameters == null) {
+            return;
+        }
+        parameters.setFlashMode(Camera.Parameters.FLASH_MODE_OFF);
+        mCamera.setParameters(parameters);
+    }
+
+    public void recordVideo() {
+        try {
+            if (!recording) {
+                Log.d(TAG, "start recording video ");
+                if (prepareVideoRecorder()) {
+                    mediaRecorder.start();
+                    recording = true;
+                }
+            } else {
+                Log.d(TAG, "stop recording video ");
+
+                mediaRecorder.stop();
+                releaseMediaRecorder();
+                mCamera.lock();
+                recording = false;
+
+                if (mCamera != null) {
+                    mCamera.stopPreview();
+                    if (mHolder != null) {
+                        startPreview(mCamera, mHolder);
+                    }
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    private boolean prepareVideoRecorder() {
+        try {
+            Log.d(TAG, "prepare video recorder ");
+            if (mediaRecorder == null) {
+                mediaRecorder = new MediaRecorder();
+                mediaRecorder.reset();
+            }
+
+            /*camera相关设置部分*/
+            if (mCamera != null) {
+                //camera?.setDisplayOrientation(90)
+                mCamera.unlock();
+                mediaRecorder.setCamera(mCamera);
+            }
+
+            /*recorder设置部分*/
+            mediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
+            mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
+            CamcorderProfile profile = CamcorderProfile.get(mCameraId, CamcorderProfile.QUALITY_HIGH);
+            if (CamcorderProfile.hasProfile(mCameraId, videoProfile)) {
+                profile = CamcorderProfile.get(mCameraId, videoProfile);
+            }
+
+            String videoPath = getExternalFilesDir(Environment.DIRECTORY_DCIM).getPath();
+            File videoFile = new File(videoPath);
+            if (!videoFile.exists()) {
+                videoFile.mkdirs();
+            }
+
+            String path = videoPath + File.separator + System.currentTimeMillis() + "_video.mp4";
+            Log.e(TAG, "video file path: ---  " + path);
+            mediaRecorder.setProfile(profile);
+            mediaRecorder.setOutputFile(path);
+            mediaRecorder.setPreviewDisplay(mHolder.getSurface());
+            mediaRecorder.prepare();
+            return true;
+        } catch (Exception e) {
+            Log.e(TAG, "prepare video recorder error!!");
+            e.printStackTrace();
+        }
+
+        return false;
+    }
+
+    private void releaseMediaRecorder() {
+        Log.d(TAG, "release video recorder ");
+        try {
+            if (mediaRecorder != null) {
+                mediaRecorder.reset(); // clear recorder configuration
+                mediaRecorder.release(); // release the recorder object
+                mediaRecorder = null;
+                mCamera.lock(); // lock camera for later use
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+
+    /**
+     * 预览相机
+     */
+    private void startPreview(Camera camera, SurfaceHolder holder) {
+        try {
+            // 确认相机预览尺寸
+            setupCamera(camera);
+            camera.setPreviewDisplay(holder);
+            setCameraDisplayOrientation(mCameraId, camera);
+            camera.startPreview();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    public void setCameraDisplayOrientation(int cameraId, Camera camera) {
+        android.hardware.Camera.CameraInfo info =
+                new android.hardware.Camera.CameraInfo();
+        android.hardware.Camera.getCameraInfo(cameraId, info);
+        int rotation = getWindowManager().getDefaultDisplay().getRotation();
+        int degrees = 0;
+        switch (rotation) {
+            case Surface.ROTATION_0:
+                degrees = 0;
+                break;
+            case Surface.ROTATION_90:
+                degrees = 90;
+                break;
+            case Surface.ROTATION_180:
+                degrees = 180;
+                break;
+            case Surface.ROTATION_270:
+                degrees = 270;
+                break;
+            default:
+                break;
+        }
+        int result;
+        if (info.facing == Camera.CameraInfo.CAMERA_FACING_FRONT) {
+            result = (info.orientation + degrees) % 360;
+            result = (360 - result) % 360;
+        } else {
+            result = (info.orientation - degrees + 360) % 360;
+        }
+        //设置角度
+        camera.setDisplayOrientation(result);
+    }
+
+    /**
+     * 设置surfaceView的尺寸 因为camera默认是横屏,所以取得支持尺寸也都是横屏的尺寸
+     * 我们在startPreview方法里面把它矫正了过来,但是这里我们设置设置surfaceView的尺寸的时候要注意 previewSize.height<previewSize.width
+     * previewSize.width才是surfaceView的高度
+     * 一般相机都是屏幕的宽度 这里设置为屏幕宽度 高度自适应 你也可以设置自己想要的大小
+     */
+    private void setupCamera(Camera camera) {
+        Camera.Parameters parameters = camera.getParameters();
+        if (parameters.getSupportedFocusModes().contains(
+                Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE)) {
+            parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE);
+        }
+
+        List<Camera.Size> sizeList = parameters.getSupportedPreviewSizes();//获取所有支持的camera尺寸
+        //Log.d(TAG,"optionSize : mSurfaceView "+surfaceView.getWidth()+" * "+surfaceView.getHeight());
+        Camera.Size optionSize = getOptimalPreviewSize(sizeList, picHeight, picWidth);//获取一个最为适配的camera.size
+        Log.d(TAG,"optionSize : "+optionSize.width+" * "+optionSize.height);
+
+        if (optionSize.width > optionSize.height) {
+            picWidth = optionSize.height;
+            picHeight = optionSize.width;
+        } else {
+            picWidth = optionSize.width;
+            picHeight = optionSize.height;
+        }
+        parameters.setPreviewSize(optionSize.width,optionSize.height);//把camera.size赋值到parameters
+        mCamera.setParameters(parameters);
+
+
+        //根据屏幕尺寸获取最佳 大小
+        /*Camera.Size previewSize = cameraInstance.getPicPreviewSize(parameters.getSupportedPreviewSizes(),
+                screenHeight, screenWidth);
+        parameters.setPreviewSize(previewSize.width, previewSize.height);
+
+        Camera.Size pictrueSize = cameraInstance.getPicPreviewSize(parameters.getSupportedPictureSizes(),
+                screenHeight,screenWidth);
+        parameters.setPictureSize(pictrueSize.width, pictrueSize.height);
+        camera.setParameters(parameters);
+        // picHeight = (screenWidth * pictrueSize.width) / pictrueSize.height;
+        picWidth = pictrueSize.width;
+        picHeight = pictrueSize.height;
+        FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(screenWidth,
+                (screenWidth * pictrueSize.width) / pictrueSize.height);
+        svContent.setLayoutParams(params);*/
+    }
+
+    private Camera.Size getOptimalPreviewSize(List<Camera.Size> sizes, int w, int h) {
+        final double ASPECT_TOLERANCE = 0.2;
+        double targetRatio = (double) w / h;
+        if (sizes == null) return null;
+
+        Camera.Size optimalSize = null;
+        double minDiff = Double.MAX_VALUE;
+
+        // Try to find an size match aspect ratio and size
+        for (Camera.Size size : sizes) {
+            double ratio = (double) size.width / size.height;
+            if (Math.abs(ratio - targetRatio) > ASPECT_TOLERANCE) continue;
+            if (Math.abs(size.height - h) < minDiff) {
+                optimalSize = size;
+                minDiff = Math.abs(size.height - h);
+            }
+        }
+
+        // Cannot find the one match the aspect ratio, ignore the requirement
+        if (optimalSize == null) {
+            minDiff = Double.MAX_VALUE;
+            for (Camera.Size size : sizes) {
+                if (Math.abs(size.height - h) < minDiff) {
+                    optimalSize = size;
+                    minDiff = Math.abs(size.height - h);
+                }
+            }
+        }
+        return optimalSize;
+    }
+}

File diff suppressed because it is too large
+ 30 - 0
test_module/src/main/res/drawable-v24/ic_launcher_foreground.xml


+ 170 - 0
test_module/src/main/res/drawable/ic_launcher_background.xml

@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="108dp"
+    android:height="108dp"
+    android:viewportWidth="108"
+    android:viewportHeight="108">
+    <path
+        android:fillColor="#3DDC84"
+        android:pathData="M0,0h108v108h-108z" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M9,0L9,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,0L19,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M29,0L29,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M39,0L39,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M49,0L49,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M59,0L59,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M69,0L69,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M79,0L79,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M89,0L89,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M99,0L99,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,9L108,9"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,19L108,19"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,29L108,29"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,39L108,39"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,49L108,49"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,59L108,59"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,69L108,69"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,79L108,79"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,89L108,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,99L108,99"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,29L89,29"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,39L89,39"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,49L89,49"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,59L89,59"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,69L89,69"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,79L89,79"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M29,19L29,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M39,19L39,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M49,19L49,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M59,19L59,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M69,19L69,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M79,19L79,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+</vector>

+ 97 - 0
test_module/src/main/res/layout/activity_main.xml

@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <FrameLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_above="@+id/rl_camera_bottom">
+
+        <SurfaceView
+            android:id="@+id/camera_surface_view"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content" />
+
+    </FrameLayout>
+
+    <RelativeLayout
+        android:id="@+id/rl_camera_bottom"
+        android:layout_width="match_parent"
+        android:layout_height="100dp"
+        android:background="#8f8f94"
+        android:layout_alignParentBottom="true">
+
+        <Button
+            android:id="@+id/iv_back"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:padding="20dp"
+            android:gravity="center"
+            android:text="返回"
+            android:textColor="@color/white"
+            android:textSize="28sp"/>
+
+        <Button
+            android:id="@+id/img_camera"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:layout_centerInParent="true"
+            android:padding="20dp"
+            android:gravity="center"
+            android:text="拍照"
+            android:textColor="@color/white"
+            android:textSize="28sp" />
+
+        <Button
+            android:id="@+id/iv_record"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:layout_alignParentRight="true"
+            android:padding="20dp"
+            android:gravity="center"
+            android:text="录像"
+            android:textColor="@color/white"
+            android:textSize="28sp"/>
+
+    </RelativeLayout>
+
+    <LinearLayout
+        android:id="@+id/rl_camera_top"
+        android:layout_width="match_parent"
+        android:layout_height="100dp"
+        android:gravity="center_vertical"
+        android:orientation="horizontal"
+        android:background="#8f8f94"
+        android:layout_alignParentTop="true">
+
+        <Button
+            android:id="@+id/camera_flash"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:gravity="center"
+            android:layout_weight="1"
+            android:padding="10dp"
+            android:text="开启/关闭闪光灯"
+            android:textColor="@color/white"
+            android:textSize="22sp"/>
+
+        <View
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"/>
+
+        <Button
+            android:id="@+id/camera_switch"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:gravity="center"
+            android:layout_weight="1"
+            android:padding="10dp"
+            android:text="切换摄像头"
+            android:textColor="@color/white"
+            android:textSize="22sp" />
+
+    </LinearLayout>
+
+</RelativeLayout>

+ 5 - 0
test_module/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+    <background android:drawable="@drawable/ic_launcher_background" />
+    <foreground android:drawable="@drawable/ic_launcher_foreground" />
+</adaptive-icon>

+ 5 - 0
test_module/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+    <background android:drawable="@drawable/ic_launcher_background" />
+    <foreground android:drawable="@drawable/ic_launcher_foreground" />
+</adaptive-icon>

BIN
test_module/src/main/res/mipmap-hdpi/ic_launcher.png


BIN
test_module/src/main/res/mipmap-hdpi/ic_launcher_round.png


BIN
test_module/src/main/res/mipmap-mdpi/ic_launcher.png


BIN
test_module/src/main/res/mipmap-mdpi/ic_launcher_round.png


BIN
test_module/src/main/res/mipmap-xhdpi/ic_launcher.png


BIN
test_module/src/main/res/mipmap-xhdpi/ic_launcher_round.png


BIN
test_module/src/main/res/mipmap-xxhdpi/ic_launcher.png


BIN
test_module/src/main/res/mipmap-xxhdpi/ic_launcher_round.png


BIN
test_module/src/main/res/mipmap-xxxhdpi/ic_launcher.png


BIN
test_module/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png


+ 16 - 0
test_module/src/main/res/values-night/themes.xml

@@ -0,0 +1,16 @@
+<resources xmlns:tools="http://schemas.android.com/tools">
+    <!-- Base application theme. -->
+    <style name="Theme.UniPluginHelloAS" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
+        <!-- Primary brand color. -->
+        <item name="colorPrimary">@color/purple_200</item>
+        <item name="colorPrimaryVariant">@color/purple_700</item>
+        <item name="colorOnPrimary">@color/black</item>
+        <!-- Secondary brand color. -->
+        <item name="colorSecondary">@color/teal_200</item>
+        <item name="colorSecondaryVariant">@color/teal_200</item>
+        <item name="colorOnSecondary">@color/black</item>
+        <!-- Status bar color. -->
+        <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
+        <!-- Customize your theme here. -->
+    </style>
+</resources>

+ 10 - 0
test_module/src/main/res/values/colors.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <color name="purple_200">#FFBB86FC</color>
+    <color name="purple_500">#FF6200EE</color>
+    <color name="purple_700">#FF3700B3</color>
+    <color name="teal_200">#FF03DAC5</color>
+    <color name="teal_700">#FF018786</color>
+    <color name="black">#FF000000</color>
+    <color name="white">#FFFFFFFF</color>
+</resources>

+ 3 - 0
test_module/src/main/res/values/strings.xml

@@ -0,0 +1,3 @@
+<resources>
+    <string name="app_name">test_module</string>
+</resources>

+ 16 - 0
test_module/src/main/res/values/themes.xml

@@ -0,0 +1,16 @@
+<resources xmlns:tools="http://schemas.android.com/tools">
+    <!-- Base application theme. -->
+    <style name="Theme.UniPluginHelloAS" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
+        <!-- Primary brand color. -->
+        <item name="colorPrimary">@color/purple_500</item>
+        <item name="colorPrimaryVariant">@color/purple_700</item>
+        <item name="colorOnPrimary">@color/white</item>
+        <!-- Secondary brand color. -->
+        <item name="colorSecondary">@color/teal_200</item>
+        <item name="colorSecondaryVariant">@color/teal_700</item>
+        <item name="colorOnSecondary">@color/black</item>
+        <!-- Status bar color. -->
+        <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
+        <!-- Customize your theme here. -->
+    </style>
+</resources>

+ 17 - 0
test_module/src/test/java/com/wzl/test_module/ExampleUnitTest.java

@@ -0,0 +1,17 @@
+package com.wzl.test_module;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+public class ExampleUnitTest {
+    @Test
+    public void addition_isCorrect() {
+        assertEquals(4, 2 + 2);
+    }
+}

BIN
uniapp示例工程源码/unipluginDemo.rar


+ 20 - 0
uniapp示例工程源码/unipluginDemo/.hbuilderx/launch.json

@@ -0,0 +1,20 @@
+{
+    // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+    // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+    "version" : "0.0",
+    "configurations" : [
+        {
+            "app-plus" : {
+                "launchtype" : "local"
+            },
+            "default" : {
+                "launchtype" : "local"
+            },
+            "type" : "uniCloud"
+        },
+        {
+            "playground" : "custom",
+            "type" : "uni-app:app-android"
+        }
+    ]
+}

+ 18 - 0
uniapp示例工程源码/unipluginDemo/App.vue

@@ -0,0 +1,18 @@
+<script>
+	export default {
+		onLaunch: function() {
+			console.log('App Launch')
+		},
+		onShow: function() {
+			console.log('App Show')
+		},
+		onHide: function() {
+			console.log('App Hide')
+		}
+	}
+</script>
+
+<style>
+	/*每个页面公共css */
+	@import './common/uni-nvue.css';
+</style>

+ 53 - 0
uniapp示例工程源码/unipluginDemo/common/nvue.css

@@ -0,0 +1,53 @@
+.uni-pd {
+	padding-left: 30upx;
+	padding-top: 20upx;
+	padding-bottom: 20upx;
+	background-color: #EEEEEE;
+}
+.uni-padding-wrap{
+	padding:0 30upx;
+}
+.uni-list-cell {
+	position: relative;
+	display: flex;
+	margin-top: 5upx;
+	flex-direction: row;
+	justify-content: space-between;
+	align-items: center;
+	background-color: #FBFBFB;
+}
+.uni-label {
+	width: 210upx;
+	word-wrap: break-word;
+	word-break: break-all;
+	text-indent:20upx;
+}
+.uni-list-cell-db{
+	flex: 1;
+	padding-left: 20upx;
+}
+.uni-input {
+	height: 50upx;
+	flex: 1;
+}
+.uni-common-mt{
+	margin-top:30upx;
+}
+.uni-btn-v{
+	padding:10upx 0;
+}
+.btn {
+	height: 100upx;
+	border-width: 2upx;
+	border-style: solid;
+	border-color: rgb(162, 217, 192);
+	background-color: rgba(162, 217, 192, 0.2);
+	border-radius: 5upx;
+	display:inline-block;
+	margin-top: 20upx;
+	text-align: center;
+	line-height: 100upx;
+}
+.uni-center{
+	text-align:center;
+}

+ 181 - 0
uniapp示例工程源码/unipluginDemo/common/uni-nvue.css

@@ -0,0 +1,181 @@
+/* #ifndef APP-PLUS-NVUE */
+page {
+	min-height: 100%;
+	height: auto;
+}
+
+/* #endif */
+
+/* 解决头条小程序字体图标不显示问题,因为头条运行时自动插入了span标签,且有全局字体 */
+/* #ifdef MP-TOUTIAO */
+text :not(view) {
+	font-family: uniicons;
+}
+
+/* #endif */
+
+.uni-icon {
+	font-family: uniicons;
+	font-weight: normal;
+}
+
+.uni-bg-red {
+	background-color: #F76260;
+	color: #FFF;
+}
+
+.uni-bg-green {
+	background-color: #09BB07;
+	color: #FFF;
+}
+
+.uni-bg-blue {
+	background-color: #007AFF;
+	color: #FFF;
+}
+
+.uni-container {
+	flex: 1;
+	padding: 15px;
+	background-color: #f8f8f8;
+}
+
+.uni-padding-lr {
+	padding-left: 15px;
+	padding-right: 15px;
+}
+
+.uni-padding-tb {
+	padding-top: 15px;
+	padding-bottom: 15px;
+}
+
+.uni-header-logo {
+	padding: 15px 15px;
+	flex-direction: column;
+	justify-content: center;
+	align-items: center;
+	margin-top: 10upx;
+}
+
+.uni-header-image {
+	width: 80px;
+	height: 80px;
+}
+
+.uni-hello-text {
+	margin-bottom: 20px;
+}
+
+.hello-text {
+	color: #7A7E83;
+	font-size: 14px;
+	line-height: 20px;
+}
+
+.hello-link {
+	color: #7A7E83;
+	font-size: 14px;
+	line-height: 20px;
+}
+
+.uni-panel {
+	margin-bottom: 12px;
+}
+
+.uni-panel-h {
+	background-color: #ffffff;
+	flex-direction: row;
+	align-items: center;
+	padding: 12px;
+}
+
+/*
+.uni-panel-h:active {
+    background-color: #f8f8f8;
+}
+ */
+.uni-panel-h-on {
+	background-color: #f0f0f0;
+}
+
+.uni-panel-text {
+	flex: 1;
+	color: #000000;
+	font-size: 14px;
+	font-weight: normal;
+}
+
+.uni-panel-icon {
+	margin-left: 15px;
+	color: #999999;
+	font-size: 14px;
+	font-weight: normal;
+	transform: rotate(0deg);
+	transition-duration: 0s;
+	transition-property: transform;
+}
+
+.uni-panel-icon-on {
+	transform: rotate(180deg);
+}
+
+.uni-navigate-item {
+	flex-direction: row;
+	align-items: center;
+	background-color: #FFFFFF;
+	border-top-style: solid;
+	border-top-color: #f0f0f0;
+	border-top-width: 1px;
+	padding: 12px;
+}
+
+.uni-navigate-item:active {
+	background-color: #f8f8f8;
+}
+
+.uni-navigate-text {
+	flex: 1;
+	color: #000000;
+	font-size: 14px;
+	font-weight: normal;
+}
+
+.uni-navigate-icon {
+	margin-left: 15px;
+	color: #999999;
+	font-size: 14px;
+	font-weight: normal;
+}
+
+.uni-list-cell {
+	position: relative;
+	flex-direction: row;
+	justify-content: flex-start;
+	align-items: center;
+}
+
+.uni-list-cell-pd {
+	padding: 22upx 30upx;
+}
+
+.flex-r {
+	flex-direction: row;
+}
+
+.flex-c {
+	flex-direction: column;
+}
+
+.a-i-c {
+	align-items: center;
+}
+
+.j-c-c {
+	justify-content: center;
+}
+
+.list-item {
+	flex-direction: row;
+	padding: 10px;
+}

File diff suppressed because it is too large
+ 1706 - 0
uniapp示例工程源码/unipluginDemo/common/uni.css


+ 73 - 0
uniapp示例工程源码/unipluginDemo/common/util.js

@@ -0,0 +1,73 @@
+function formatTime(time) {
+	if (typeof time !== 'number' || time < 0) {
+		return time
+	}
+
+	var hour = parseInt(time / 3600)
+	time = time % 3600
+	var minute = parseInt(time / 60)
+	time = time % 60
+	var second = time
+
+	return ([hour, minute, second]).map(function (n) {
+		n = n.toString()
+		return n[1] ? n : '0' + n
+	}).join(':')
+}
+
+function formatLocation(longitude, latitude) {
+	if (typeof longitude === 'string' && typeof latitude === 'string') {
+		longitude = parseFloat(longitude)
+		latitude = parseFloat(latitude)
+	}
+
+	longitude = longitude.toFixed(2)
+	latitude = latitude.toFixed(2)
+
+	return {
+		longitude: longitude.toString().split('.'),
+		latitude: latitude.toString().split('.')
+	}
+}
+var dateUtils = {
+	UNITS: {
+		'年': 31557600000,
+		'月': 2629800000,
+		'天': 86400000,
+		'小时': 3600000,
+		'分钟': 60000,
+		'秒': 1000
+	},
+	humanize: function (milliseconds) {
+		var humanize = '';
+		for (var key in this.UNITS) {
+			if (milliseconds >= this.UNITS[key]) {
+				humanize = Math.floor(milliseconds / this.UNITS[key]) + key + '前';
+				break;
+			}
+		}
+		return humanize || '刚刚';
+	},
+	format: function (dateStr) {
+		var date = this.parse(dateStr)
+		var diff = Date.now() - date.getTime();
+		if (diff < this.UNITS['天']) {
+			return this.humanize(diff);
+		}
+		var _format = function (number) {
+			return (number < 10 ? ('0' + number) : number);
+		};
+		return date.getFullYear() + '/' + _format(date.getMonth() + 1) + '/' + _format(date.getDay()) + '-' +
+			_format(date.getHours()) + ':' + _format(date.getMinutes());
+	},
+	parse: function (str) { //将"yyyy-mm-dd HH:MM:ss"格式的字符串,转化为一个Date对象
+		var a = str.split(/[^0-9]/);
+		return new Date(a[0], a[1] - 1, a[2], a[3], a[4], a[5]);
+	}
+};
+
+module.exports = {
+	formatTime: formatTime,
+	formatLocation: formatLocation,
+	dateUtils: dateUtils
+}

+ 11 - 0
uniapp示例工程源码/unipluginDemo/main.js

@@ -0,0 +1,11 @@
+import Vue from 'vue'
+import App from './App'
+
+Vue.config.productionTip = false
+
+App.mpType = 'app'
+
+const app = new Vue({
+    ...App
+})
+app.$mount()

+ 101 - 0
uniapp示例工程源码/unipluginDemo/manifest.json

@@ -0,0 +1,101 @@
+{
+    "name" : "unipluginDemoTest",
+    "appid" : "__UNI__42E133A",
+    "description" : "",
+    "versionName" : "1.0.3",
+    "versionCode" : 103,
+    "transformPx" : false,
+    /* 5+App特有相关 */
+    "app-plus" : {
+        "usingComponents" : true,
+        "nvueCompiler" : "uni-app",
+        "compilerVersion" : 3,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        /* 模块配置 */
+        "modules" : {},
+        /* 应用发布信息 */
+        "distribute" : {
+            /* android打包配置 */
+            "android" : {
+                "permissions" : [
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ],
+                "abiFilters" : [ "armeabi-v7a", "arm64-v8a" ]
+            },
+            /* ios打包配置 */
+            "ios" : {
+                "dSYMs" : false,
+                "idfa" : true
+            },
+            /* SDK配置 */
+            "sdkConfigs" : {
+                "push" : {
+                    "fcm" : {}
+                },
+                "ad" : {},
+                "statics" : {}
+            }
+        },
+        "nativePlugins" : {
+            "uniplugin_camera" : {
+                "__plugin_info__" : {
+                    "name" : "uniplugin_camera",
+                    "description" : "des",
+                    "platforms" : "Android",
+                    "url" : "",
+                    "android_package_name" : "",
+                    "ios_bundle_id" : "",
+                    "isCloud" : false,
+                    "bought" : -1,
+                    "pid" : "",
+                    "parameters" : {}
+                }
+            }
+        }
+    },
+    /* 快应用特有相关 */
+    "quickapp" : {},
+    /* 小程序特有相关 */
+    "mp-weixin" : {
+        "appid" : "",
+        "setting" : {
+            "urlCheck" : false
+        },
+        "usingComponents" : true
+    },
+    "mp-alipay" : {
+        "usingComponents" : true
+    },
+    "mp-baidu" : {
+        "usingComponents" : true
+    },
+    "mp-toutiao" : {
+        "usingComponents" : true
+    },
+    "vueVersion" : "2"
+}

BIN
uniapp示例工程源码/unipluginDemo/nativeplugins/uniplugin_camera/android/uniplugin_camera-release.aar


+ 46 - 0
uniapp示例工程源码/unipluginDemo/nativeplugins/uniplugin_camera/package.json

@@ -0,0 +1,46 @@
+{
+  "name": "uniplugin_camera",
+  "id": "uniplugin_camera",
+  "version": "v1.0.0",
+  "description": "des",
+  "_dp_type": "nativeplugin",
+  "_dp_nativeplugin": {
+    "android": {
+      "plugins": [
+        {
+            "type": "component",
+            "name": "testText",
+            "class": "com.wdkl.uniplugin_camera.TestText"
+        }
+      ],
+	  
+	  "plugins": [
+	    {
+	        "type": "component",
+	        "name": "cameraPlugin",
+	        "class": "com.wdkl.uniplugin_camera.CameraPlugin"
+	    }
+	  ],
+	  
+	  "integrateType": "aar",
+	  
+	  "dependencies": [
+	  ],
+	  
+	  "compileOptions": {
+	  	"sourceCompatibility": "1.8",
+	  	"targetCompatibility": "1.8"
+	  },
+	  
+	  "abis": [
+	  	"armeabi-v7a"
+	  ],
+	  
+	  "minSdkVersion": "23",
+	   
+	  "permissions": [
+	  	
+	   ]
+    }
+  }
+}

+ 50 - 0
uniapp示例工程源码/unipluginDemo/pages.json

@@ -0,0 +1,50 @@
+{
+	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+		{
+			"path": "pages/index/index",
+			"style": {
+				"navigationBarTitleText": "uni-app"
+			}
+		},
+		{
+			"path": "pages/sample/ext-module",
+			"style": {
+				"navigationBarTitleText": "扩展 module"
+			}
+		},
+		{
+			"path": "pages/sample/ext-component",
+			"style": {
+				"navigationBarTitleText": "扩展 component"
+			}
+		},
+		{
+			"path": "pages/sample/richAlert",
+			"style": {
+				"navigationBarTitleText": "RichAlert"
+			}
+		},
+		{
+			"path": "pages/sample/uts_toast",
+			"style": {
+				"navigationBarTitleText": "UTS 原生插件"
+			}
+		}
+	],
+	"globalStyle": {
+		"navigationBarTextStyle": "black",
+		"navigationBarTitleText": "uni-app",
+		"navigationBarBackgroundColor": "#F8F8F8",
+		"backgroundColor": "#F8F8F8"
+	},
+	"condition" : { //模式配置,仅开发期间生效
+		"current": 0, //当前激活的模式(list 的索引项)
+		"list": [
+			{
+				"name": "", //模式名称
+				"path": "", //启动页面,必选
+				"query": "" //启动参数,在页面的onLoad函数里面得到
+			}
+		]
+	}
+}

+ 84 - 0
uniapp示例工程源码/unipluginDemo/pages/index/index.vue

@@ -0,0 +1,84 @@
+<template>
+	<view class="uni-container">
+		<view class="uni-hello-text">
+			<text class="hello-text">uni原生插件示例</text>
+		</view>
+		<view class="uni-panel" v-for="(item, index) in list" :key="item.id">
+			<view class="uni-panel-h" :class="item.open ? 'uni-panel-h-on' : ''" @click="triggerCollapse(index)">
+				<text class="uni-panel-text">{{item.name}}</text>
+				<text class="uni-panel-icon uni-icon" :class="item.open ? 'uni-panel-icon-on' : ''">{{item.pages ? '&#xe581;' : '&#xe470;'}}</text>
+			</view>
+			<view class="uni-panel-c" v-if="item.open">
+				<view class="uni-navigate-item" v-for="(item2,key) in item.pages" :key="key" @click="goDetailPage(item2.url)">
+					<text class="uni-navigate-text">{{item2.name ? item2.name : item2}}</text>
+					<text class="uni-navigate-icon uni-icon">&#xe470;</text>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+	export default {
+		data() {
+			return {
+				list: [{
+					id: 'ext-module',
+					name: '扩展 module',
+					open: false,
+					url: '/pages/sample/ext-module'
+				},
+				{
+					id: 'ext-component',
+					name: '扩展 component',
+					open: false,
+					url: '/pages/sample/ext-component'
+				},
+				{
+					id:'richAlert',
+					name:'插件示例RichAlert',
+					open:false,
+					url:'/pages/sample/richAlert'
+				},
+				{
+					id:'UTS_modules',
+					name:'UTS 原生插件',
+					open:false,
+					url:'/pages/sample/uts_toast'
+				}],
+				navigateFlag: false
+			}
+		},
+		onLoad() {},
+		methods: {
+			triggerCollapse(e) {
+				if (!this.list[e].pages) {
+					this.goDetailPage(this.list[e].url);
+					return;
+				}
+				for (var i = 0; i < this.list.length; ++i) {
+					if (e === i) {
+						this.list[i].open = !this.list[e].open;
+					} else {
+						this.list[i].open = false;
+					}
+				}
+			},
+			goDetailPage(e) {
+				if (this.navigateFlag) {
+					return;
+				}
+				this.navigateFlag = true;
+				uni.navigateTo({
+					url: e
+				});
+				setTimeout(() => {
+					this.navigateFlag = false;
+				}, 200)
+				return false;
+			}
+		}
+	}
+</script>
+
+<style>
+</style>

+ 76 - 0
uniapp示例工程源码/unipluginDemo/pages/sample/ext-component.nvue

@@ -0,0 +1,76 @@
+<template>
+	<div>
+		<!-- <testText ref="telText" tel="TestText Component" style="width:200;height:100" @onTel="onTel" @click="myTextClick"></testText> -->
+		
+		<cameraPlugin ref="cameraPlugin" style="width:400;height:400" 
+		@onVideoPath="onVideoPath" 
+		@onImgPath="onImgPath" 
+		@onCameraViewInit="onCameraViewInit"></cameraPlugin>
+		
+		<button type="primary" @click="switchLight">闪关灯</button>
+		<button type="primary" @click="switchCamera">摄像头切换</button>
+		<button type="primary" @click="takePhoto">拍照</button>
+		<button type="primary" @click="recordVideo">录像</button>
+	</div>
+</template>
+
+<script>  
+    export default {  
+		
+        data() {  
+            return {  
+            }  
+        },  
+        onLoad() {  
+        },  
+        methods: {  
+			onTel(e) {
+				console.log("onTel="+e.detail.tel);
+			},
+			myTextClick(e) {
+				//this.$refs.telText.clearTel();
+				this.$refs.telText.setTelText("camera test text")
+			},
+			
+			//camera plugin
+			autoFocus() {
+				console.log("autoFocus");
+				this.$refs.cameraPlugin.autoFocus()
+			},
+			switchLight() {
+				console.log("switchLight");
+				this.$refs.cameraPlugin.switchFlashLight()
+			},
+			switchCamera() {
+				console.log("switchCamera");
+				this.$refs.cameraPlugin.switchCamera()
+			},
+			takePhoto() {
+				//this.$refs.cameraPlugin.setPicUseFinalPath(true)
+				console.log("takePhote");
+				this.$refs.cameraPlugin.takePhoto()
+			},
+			recordVideo() {
+				//this.$refs.cameraPlugin.setVideoUseFinalPath(true)
+				//this.$refs.cameraPlugin.setVideoProfile("1080p")
+				console.log("recordVideo");
+				this.$refs.cameraPlugin.recordVideo()
+			},
+			onImgPath(e) {
+				console.log("onImgPath="+e.detail.img_path);
+			},
+			onVideoPath(e) {
+				console.log("onVideoPath="+e.detail.video_path);
+			},onCameraViewInit(e) {
+				//插件初始化完成的回调
+				console.log("onCameraViewInit="+e.detail.camera_init)
+				//设置图片宽高,默认1080x1920
+				//this.$refs.cameraPlugin.setPicSize(1080, 1920)
+				//设置camera参数,微循环的不要设置,否则黑屏
+				//this.$refs.cameraPlugin.setupCamera()
+				//设置完成后打开对应摄像头,0=后置,1=前置
+				this.$refs.cameraPlugin.openCamera(1)
+			}
+        }  
+    }  
+</script>  

+ 53 - 0
uniapp示例工程源码/unipluginDemo/pages/sample/ext-module.nvue

@@ -0,0 +1,53 @@
+<template>
+	<div>
+		<button type="primary" @click="testAsyncFunc">testAsyncFunc</button>
+		<button type="primary" @click="testSyncFunc">testSyncFunc</button>
+		<!-- <button type="primary" @click="gotoNativePage">跳转原生Activity</button> -->
+		<button type="primary" @click="gotoNativePage">跳转原生Activity</button>
+	</div>
+</template>
+
+<script>
+	// 获取 module 
+	var testModule = uni.requireNativePlugin("TestModule")
+	const modal = uni.requireNativePlugin('modal');
+	export default {
+		onLoad() {
+			plus.globalEvent.addEventListener('TestEvent', function(e){
+				modal.toast({
+					message: "TestEvent收到:"+e.msg,
+					duration: 1.5
+				});
+			});
+		},
+		methods: {
+			testAsyncFunc() {
+				// 调用异步方法
+				testModule.testAsyncFunc({
+						'name': 'unimp',
+						'age': 1
+					},
+					(ret) => {
+						modal.toast({
+							message: ret,
+							duration: 1.5
+						});
+					})
+			},
+			testSyncFunc() {
+				// 调用同步方法
+				var ret = testModule.testSyncFunc({
+					'name': 'unimp',
+					'age': 1
+				})
+				modal.toast({
+					message: ret,
+					duration: 1.5
+				});
+			},
+			gotoNativePage() {
+				testModule.gotoNativePage();
+			}
+		}
+	}
+</script>

+ 112 - 0
uniapp示例工程源码/unipluginDemo/pages/sample/richAlert.vue

@@ -0,0 +1,112 @@
+<template>
+	<view class="button-sp-area">
+		<button type="primary" plain="true" @click="showRichAlert()">点击显示弹窗</button>
+	</view>
+</template>
+
+<script>
+	const modal = uni.requireNativePlugin('modal');
+	const dcRichAlert = uni.requireNativePlugin('DCloud-RichAlert');
+	export default {
+		data() {
+			return {
+				title: ''
+			}
+		},
+		onLoad() {
+
+		},
+		methods: {
+			showRichAlert() {
+				dcRichAlert.show({
+					position: 'bottom',
+					title: "提示信息",
+					titleColor: '#FF0000',
+					content: "<a href='https://uniapp.dcloud.io/' value='Hello uni-app'>uni-app</a> 是一个使用 Vue.js 开发跨平台应用的前端框架!\n免费的\n免费的\n免费的\n重要的事情说三遍",
+					contentAlign: 'left',
+					checkBox: {
+						title: '不再提示',
+						isSelected: true
+					},
+					buttons: [{
+							title: '取消'
+						},
+						{
+							title: '否'
+						},
+						{
+							title: '确认',
+							titleColor: '#3F51B5'
+						}
+					]
+				}, result => {
+					const msg = JSON.stringify(result);
+					modal.toast({
+						message: msg,
+						duration: 1.5
+					});
+					switch (result.type) {
+						case 'button':
+							console.log("callback---button--" + result.index);
+							break;
+						case 'checkBox':
+							console.log("callback---checkBox--" + result.isSelected);
+							break;
+						case 'a':
+							console.log("callback---a--" + JSON.stringify(result));
+							break;
+						case 'backCancel':
+							console.log("callback---backCancel--");
+							break;
+					}
+				});
+			},
+
+			// 			nvueclick() {
+			// 				uni.navigateTo({
+			// 					url: '/pages/nvue/index2'
+			// 				});
+			// 			}
+		}
+	}
+</script>
+
+<style>
+	button {
+		margin-top: 30upx;
+		margin-bottom: 30upx;
+	}
+
+	.button-sp-area {
+		margin: 0 auto;
+		width: 60%;
+	}
+
+	.content {
+		text-align: center;
+		height: 400upx;
+	}
+
+	.wrapper {
+		flex-direction: column;
+		justify-content: center;
+	}
+
+	.button {
+		width: 200px;
+		margin-top: 30px;
+		margin-left: 20px;
+		padding-top: 20px;
+		padding-bottom: 20px;
+		border-width: 2px;
+		border-style: solid;
+		border-color: #458B00;
+		background-color: #458B00;
+	}
+
+	.text {
+		font-size: 30px;
+		color: #666666;
+		text-align: center;
+	}
+</style>

+ 31 - 0
uniapp示例工程源码/unipluginDemo/pages/sample/uts_toast.vue

@@ -0,0 +1,31 @@
+<template>
+	<view>
+		<button @click="showUTSToast">点击按钮会在底部显示一条toast</button>
+	</view>
+</template>
+
+<script>
+	import {
+		showToast
+	} from "@/uni_modules/uts-toast"
+	export default {
+		data() {
+			return {
+				title: 'Hello'
+			}
+		},
+		onLoad() {
+
+		},
+		methods: {
+			showUTSToast() {
+				showToast({
+					message: "这是一条显示在底部的toast"
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+</style>

BIN
uniapp示例工程源码/unipluginDemo/static/logo.png


+ 76 - 0
uniapp示例工程源码/unipluginDemo/uni.scss

@@ -0,0 +1,76 @@
+/**
+ * 这里是uni-app内置的常用样式变量
+ *
+ * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
+ * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
+ *
+ */
+
+/**
+ * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
+ *
+ * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
+ */
+
+/* 颜色变量 */
+
+/* 行为相关颜色 */
+$uni-color-primary: #007aff;
+$uni-color-success: #4cd964;
+$uni-color-warning: #f0ad4e;
+$uni-color-error: #dd524d;
+
+/* 文字基本颜色 */
+$uni-text-color:#333;//基本色
+$uni-text-color-inverse:#fff;//反色
+$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
+$uni-text-color-placeholder: #808080;
+$uni-text-color-disable:#c0c0c0;
+
+/* 背景颜色 */
+$uni-bg-color:#ffffff;
+$uni-bg-color-grey:#f8f8f8;
+$uni-bg-color-hover:#f1f1f1;//点击状态颜色
+$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
+
+/* 边框颜色 */
+$uni-border-color:#c8c7cc;
+
+/* 尺寸变量 */
+
+/* 文字尺寸 */
+$uni-font-size-sm:24rpx;
+$uni-font-size-base:28rpx;
+$uni-font-size-lg:32rpx;
+
+/* 图片尺寸 */
+$uni-img-size-sm:40rpx;
+$uni-img-size-base:52rpx;
+$uni-img-size-lg:80rpx;
+
+/* Border Radius */
+$uni-border-radius-sm: 4rpx;
+$uni-border-radius-base: 6rpx;
+$uni-border-radius-lg: 12rpx;
+$uni-border-radius-circle: 50%;
+
+/* 水平间距 */
+$uni-spacing-row-sm: 10px;
+$uni-spacing-row-base: 20rpx;
+$uni-spacing-row-lg: 30rpx;
+
+/* 垂直间距 */
+$uni-spacing-col-sm: 8rpx;
+$uni-spacing-col-base: 16rpx;
+$uni-spacing-col-lg: 24rpx;
+
+/* 透明度 */
+$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
+
+/* 文章场景相关 */
+$uni-color-title: #2C405A; // 文章标题颜色
+$uni-font-size-title:40rpx;
+$uni-color-subtitle: #555555; // 二级标题颜色
+$uni-font-size-subtitle:36rpx;
+$uni-color-paragraph: #3F536E; // 文章段落颜色
+$uni-font-size-paragraph:30rpx;

+ 0 - 0
uniapp示例工程源码/unipluginDemo/uni_modules/uts-toast/changelog.md


+ 82 - 0
uniapp示例工程源码/unipluginDemo/uni_modules/uts-toast/package.json

@@ -0,0 +1,82 @@
+{
+  "id": "uts-toast",
+  "displayName": "uts-toast",
+  "version": "1.0.0",
+  "description": "uts-toast",
+  "keywords": [
+    "uts-toast"
+],
+  "repository": "",
+  "engines": {
+    "HBuilderX": "^3.6.8"
+  },
+  "dcloudext": {
+    "type": "uts",
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "",
+      "data": "",
+      "permissions": ""
+    },
+    "npmurl": ""
+  },
+  "uni_modules": {
+    "dependencies": [],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "u",
+        "aliyun": "u",
+        "alipay": "u"
+      },
+      "client": {
+        "Vue": {
+          "vue2": "u",
+          "vue3": "u"
+        },
+        "App": {
+          "app-android": "u",
+          "app-ios": "u"
+        },
+        "H5-mobile": {
+          "Safari": "u",
+          "Android Browser": "u",
+          "微信浏览器(Android)": "u",
+          "QQ浏览器(Android)": "u"
+        },
+        "H5-pc": {
+          "Chrome": "u",
+          "IE": "u",
+          "Edge": "u",
+          "Firefox": "u",
+          "Safari": "u"
+        },
+        "小程序": {
+          "微信": "u",
+          "阿里": "u",
+          "百度": "u",
+          "字节跳动": "u",
+          "QQ": "u",
+          "钉钉": "u",
+          "快手": "u",
+          "飞书": "u",
+          "京东": "u"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        }
+      }
+    }
+  }
+}

+ 6 - 0
uniapp示例工程源码/unipluginDemo/uni_modules/uts-toast/readme.md

@@ -0,0 +1,6 @@
+# uts-toast
+### 开发文档
+[UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html)
+[UTS API插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html)
+[UTS 组件插件](https://uniapp.dcloud.net.cn/plugin/uts-component.html)
+[Hello UTS](https://gitcode.net/dcloud/hello-uts)

+ 3 - 0
uniapp示例工程源码/unipluginDemo/uni_modules/uts-toast/utssdk/app-android/config.json

@@ -0,0 +1,3 @@
+{
+  "minSdkVersion": "21"
+}

+ 11 - 0
uniapp示例工程源码/unipluginDemo/uni_modules/uts-toast/utssdk/app-android/index.uts

@@ -0,0 +1,11 @@
+import { ToastOptions } from "../interface";
+import Toast from 'android.widget.Toast';
+
+export function showToast(option : ToastOptions) : void {
+	class MainThreadRunnable extends Runnable {
+		override run() {
+			Toast.makeText(UTSAndroid.getUniActivity()!, option.message, Toast.LENGTH_LONG).show()
+		}
+	}
+	UTSAndroid.getUniActivity()?.runOnUiThread(new MainThreadRunnable())
+}

+ 5 - 0
uniapp示例工程源码/unipluginDemo/uni_modules/uts-toast/utssdk/interface.uts

@@ -0,0 +1,5 @@
+export type ToastOptions = {
+	message : string
+}
+
+export type showToast = (option : ToastOptions) => void

BIN
uniapp示例工程源码/unipluginDemo/unpackage/cache/app-android/uts/uni_modules/uts-toast/classes.dex


BIN
uniapp示例工程源码/unipluginDemo/unpackage/cache/app-android/uts/uni_modules/uts-toast/index.jar


+ 0 - 0
uniapp示例工程源码/unipluginDemo/unpackage/cache/app-android/uts/uni_modules/uts-toast/index.kt.map


Some files were not shown because too many files changed in this diff