瀏覽代碼

1.增加微信支付
2.增加阿里支付
3.增加一键登录sdk

FailedToRead 3 年之前
父節點
當前提交
9f7b23effa
共有 48 個文件被更改,包括 8205 次插入6767 次删除
  1. 二進制
      .idea/caches/build_file_checksums.ser
  2. 1 1
      .idea/modules.xml
  3. 14 15
      .idea/modules/-1880156357/proj.android-studio.libcocos2dx.iml
  4. 57 15
      .idea/modules/app/proj.android-studio.efunbox-ott-launcher.iml
  5. 15 30
      .idea/modules/game/proj.android-studio.game.iml
  6. 5 5
      .idea/modules/instantapp/proj.android-studio.instantapp.iml
  7. 20 0
      .idea/proj.android-studio.iml
  8. 735 735
      app/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/android_gradle_build.json
  9. 10 10
      app/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/android_gradle_build_mini.json
  10. 1 2
      app/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/ndkBuild_build_command.txt
  11. 738 365
      app/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/ndkBuild_build_output.txt
  12. 735 735
      app/.externalNativeBuild/ndkBuild/release/armeabi-v7a/android_gradle_build.json
  13. 10 10
      app/.externalNativeBuild/ndkBuild/release/armeabi-v7a/android_gradle_build_mini.json
  14. 1 1
      app/.externalNativeBuild/ndkBuild/release/armeabi-v7a/ndkBuild_build_command.txt
  15. 738 365
      app/.externalNativeBuild/ndkBuild/release/armeabi-v7a/ndkBuild_build_output.txt
  16. 55 1
      app/AndroidManifest.xml
  17. 20 12
      app/build.gradle
  18. 71 0
      app/src/com/edufound/mobile/wxapi/WXEntryActivity.java
  19. 87 0
      app/src/com/edufound/mobile/wxapi/WXPayEntryActivity.java
  20. 15 0
      app/src/main/res/values/styles.xml
  21. 735 735
      game/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/android_gradle_build.json
  22. 10 10
      game/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/android_gradle_build_mini.json
  23. 1 1
      game/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/ndkBuild_build_command.txt
  24. 366 365
      game/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/ndkBuild_build_output.txt
  25. 735 735
      game/.externalNativeBuild/ndkBuild/debugFeature/armeabi-v7a/android_gradle_build.json
  26. 10 10
      game/.externalNativeBuild/ndkBuild/debugFeature/armeabi-v7a/android_gradle_build_mini.json
  27. 1 1
      game/.externalNativeBuild/ndkBuild/debugFeature/armeabi-v7a/ndkBuild_build_command.txt
  28. 366 365
      game/.externalNativeBuild/ndkBuild/debugFeature/armeabi-v7a/ndkBuild_build_output.txt
  29. 735 735
      game/.externalNativeBuild/ndkBuild/release/armeabi-v7a/android_gradle_build.json
  30. 10 10
      game/.externalNativeBuild/ndkBuild/release/armeabi-v7a/android_gradle_build_mini.json
  31. 1 1
      game/.externalNativeBuild/ndkBuild/release/armeabi-v7a/ndkBuild_build_command.txt
  32. 366 365
      game/.externalNativeBuild/ndkBuild/release/armeabi-v7a/ndkBuild_build_output.txt
  33. 735 735
      game/.externalNativeBuild/ndkBuild/releaseFeature/armeabi-v7a/android_gradle_build.json
  34. 10 10
      game/.externalNativeBuild/ndkBuild/releaseFeature/armeabi-v7a/android_gradle_build_mini.json
  35. 1 1
      game/.externalNativeBuild/ndkBuild/releaseFeature/armeabi-v7a/ndkBuild_build_command.txt
  36. 366 365
      game/.externalNativeBuild/ndkBuild/releaseFeature/armeabi-v7a/ndkBuild_build_output.txt
  37. 5 6
      game/build.gradle
  38. 6 6
      gradle.properties
  39. 二進制
      libs/alipaysdk-15.8.05.211018174351.aar
  40. 二進制
      libs/auth_number_product-2.12.3-log-online-standard-release.aar
  41. 二進制
      libs/crashshield-2.1.2-release.aar
  42. 二進制
      libs/logger-2.1.2-release.aar
  43. 二進制
      libs/main-2.1.2-release.aar
  44. 21 9
      src/org/cocos2dx/javascript/AppActivity.java
  45. 1 0
      src/org/cocos2dx/javascript/bean/AliPayResult.java
  46. 227 0
      src/org/cocos2dx/javascript/presenter/MainPresenter.java
  47. 54 0
      src/org/cocos2dx/javascript/util/DeviceUuidFactory.java
  48. 115 0
      src/org/cocos2dx/javascript/util/SPutil.java

二進制
.idea/caches/build_file_checksums.ser


+ 1 - 1
.idea/modules.xml

@@ -2,7 +2,7 @@
 <project version="4">
   <component name="ProjectModuleManager">
     <modules>
-      <module fileurl="file://$PROJECT_DIR$/.idea/modules/proj.android-studio.iml" filepath="$PROJECT_DIR$/.idea/modules/proj.android-studio.iml" />
+      <module fileurl="file://$PROJECT_DIR$/.idea/proj.android-studio.iml" filepath="$PROJECT_DIR$/.idea/proj.android-studio.iml" />
       <module fileurl="file://$PROJECT_DIR$/.idea/modules/app/proj.android-studio.efunbox-ott-launcher.iml" filepath="$PROJECT_DIR$/.idea/modules/app/proj.android-studio.efunbox-ott-launcher.iml" />
       <module fileurl="file://$PROJECT_DIR$/.idea/modules/game/proj.android-studio.game.iml" filepath="$PROJECT_DIR$/.idea/modules/game/proj.android-studio.game.iml" />
       <module fileurl="file://$PROJECT_DIR$/.idea/modules/instantapp/proj.android-studio.instantapp.iml" filepath="$PROJECT_DIR$/.idea/modules/instantapp/proj.android-studio.instantapp.iml" />

File diff suppressed because it is too large
+ 14 - 15
.idea/modules/-1880156357/proj.android-studio.libcocos2dx.iml


+ 57 - 15
.idea/modules/app/proj.android-studio.efunbox-ott-launcher.iml

@@ -10,28 +10,28 @@
     </facet>
     <facet type="native-android-gradle" name="Native-Android-Gradle">
       <configuration>
-        <option name="SELECTED_BUILD_VARIANT" value="debug-armeabi-v7a" />
+        <option name="SELECTED_BUILD_VARIANT" value="release-armeabi-v7a" />
       </configuration>
     </facet>
     <facet type="android" name="Android">
       <configuration>
-        <option name="SELECTED_BUILD_VARIANT" value="debug" />
-        <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
-        <option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
+        <option name="SELECTED_BUILD_VARIANT" value="release" />
+        <option name="ASSEMBLE_TASK_NAME" value="assembleRelease" />
+        <option name="COMPILE_JAVA_TASK_NAME" value="compileReleaseSources" />
         <afterSyncTasks>
-          <task>generateDebugSources</task>
+          <task>generateReleaseSources</task>
         </afterSyncTasks>
         <option name="ALLOW_USER_CONFIGURATION" value="false" />
         <option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
-        <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/../../../app/src/main/res;file://$MODULE_DIR$/../../../res;file://$MODULE_DIR$/../../../app/res;file://$MODULE_DIR$/../../../app/src/debug/res;file://$MODULE_DIR$/../../../app/build/generated/res/rs/debug;file://$MODULE_DIR$/../../../app/build/generated/res/resValues/debug" />
-        <option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/../../../app/src/androidTest/res;file://$MODULE_DIR$/../../../app/src/androidTestDebug/res;file://$MODULE_DIR$/../../../app/build/generated/res/rs/androidTest/debug;file://$MODULE_DIR$/../../../app/build/generated/res/resValues/androidTest/debug" />
+        <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/../../../app/src/main/res;file://$MODULE_DIR$/../../../res;file://$MODULE_DIR$/../../../app/res;file://$MODULE_DIR$/../../../app/src/release/res;file://$MODULE_DIR$/../../../app/build/generated/res/rs/release;file://$MODULE_DIR$/../../../app/build/generated/res/resValues/release" />
+        <option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/../../../app/src/androidTest/res" />
         <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
       </configuration>
     </facet>
   </component>
   <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
-    <output url="file://$MODULE_DIR$/../../../app/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes" />
-    <output-test url="file://$MODULE_DIR$/../../../app/build/intermediates/javac/debugUnitTest/compileDebugUnitTestJavaWithJavac/classes" />
+    <output url="file://$MODULE_DIR$/../../../app/build/intermediates/javac/release/compileReleaseJavaWithJavac/classes" />
+    <output-test url="file://$MODULE_DIR$/../../../app/build/intermediates/javac/releaseUnitTest/compileReleaseUnitTestJavaWithJavac/classes" />
     <exclude-output />
     <content url="file://$MODULE_DIR$/../../../../../../../../../AndroidStudio/sdk/ndk-bundle/sources/android/cpufeatures">
       <sourceFolder url="file://$MODULE_DIR$/../../../../../../../../../AndroidStudio/sdk/ndk-bundle/sources/android/cpufeatures" isTestSource="false" />
@@ -187,13 +187,13 @@
       <sourceFolder url="file://$MODULE_DIR$/../../../../Classes" isTestSource="false" />
     </content>
     <content url="file://$MODULE_DIR$/../../../app">
-      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/rs/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/apt/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/resValues/debug" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/rs/debug" type="java-resource" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/src" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/src/main/res" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/apt/release" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/buildConfig/release" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/rs/release" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/resValues/release" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/rs/release" type="java-resource" />
       <excludeFolder url="file://$MODULE_DIR$/../../../app/.cxx" />
       <excludeFolder url="file://$MODULE_DIR$/../../../app/.externalNativeBuild" />
       <excludeFolder url="file://$MODULE_DIR$/../../../app/.gradle" />
@@ -208,14 +208,56 @@
     <content url="file://$MODULE_DIR$/../../../src">
       <sourceFolder url="file://$MODULE_DIR$/../../../src" isTestSource="false" />
     </content>
-    <orderEntry type="jdk" jdkName="Android API 31 Platform" jdkType="Android SDK" />
+    <orderEntry type="jdk" jdkName="Android API 30 Platform" jdkType="Android SDK" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="library" name="Gradle: ./../../../../../../CocosCreator/cocoscreator_ide/CocosCreator_v2.4.0_20200622_win/resources/cocos2d-x/cocos/platform/android/java/libs/com.android.vending.expansion.zipfile.jar" level="project" />
     <orderEntry type="library" name="Gradle: ./../../../../../../CocosCreator/cocoscreator_ide/CocosCreator_v2.4.0_20200622_win/resources/cocos2d-x/cocos/platform/android/java/libs/okhttp-3.12.7.jar" level="project" />
     <orderEntry type="library" name="Gradle: ./../../../../../../CocosCreator/cocoscreator_ide/CocosCreator_v2.4.0_20200622_win/resources/cocos2d-x/cocos/platform/android/java/libs/okio-1.15.0.jar" level="project" />
     <orderEntry type="library" name="Gradle: com.google.code.gson:gson:2.8.6" level="project" />
+    <orderEntry type="library" name="Gradle: com.tencent.mm.opensdk:wechat-sdk-android-with-mta:5.4.0" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:collections:28.0.0" level="project" />
+    <orderEntry type="library" name="Gradle: android.arch.lifecycle:common:1.1.1" level="project" />
+    <orderEntry type="library" name="Gradle: android.arch.core:common:1.1.1" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:support-annotations:28.0.0" level="project" />
     <orderEntry type="library" name="Gradle: org.slf4j:slf4j-android:1.7.21" level="project" />
     <orderEntry type="library" name="Gradle: org.slf4j:slf4j-api:1.7.21" level="project" />
+    <orderEntry type="library" name="Gradle: ./libs/alipaysdk-15.8.05.211018174351.aar" level="project" />
+    <orderEntry type="library" name="Gradle: ./libs/auth_number_product-2.12.3-log-online-standard-release.aar" level="project" />
+    <orderEntry type="library" name="Gradle: ./libs/crashshield-2.1.2-release.aar" level="project" />
+    <orderEntry type="library" name="Gradle: ./libs/logger-2.1.2-release.aar" level="project" />
+    <orderEntry type="library" name="Gradle: ./libs/main-2.1.2-release.aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:appcompat-v7:28.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.google.android.gms:play-services-instantapps:16.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.google.android.gms:play-services-base:15.0.1@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.google.android.gms:play-services-tasks:15.0.1@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.google.android.gms:play-services-basement:15.0.1@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:support-v4:26.1.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:support-fragment:28.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:animated-vector-drawable:28.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:support-core-ui:28.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:support-core-utils:28.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:support-vector-drawable:28.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:loader:28.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:viewpager:28.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:coordinatorlayout:28.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:drawerlayout:28.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:slidingpanelayout:28.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:customview:28.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:swiperefreshlayout:28.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:asynclayoutinflater:28.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:support-media-compat:26.1.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:support-compat:28.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:versionedparcelable:28.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:cursoradapter:28.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: android.arch.lifecycle:runtime:1.1.1@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:documentfile:28.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:localbroadcastmanager:28.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:print:28.0.0@aar" level="project" />
+    <orderEntry type="library" name="Gradle: android.arch.lifecycle:viewmodel:1.1.1@aar" level="project" />
+    <orderEntry type="library" name="Gradle: android.arch.lifecycle:livedata:1.1.1@aar" level="project" />
+    <orderEntry type="library" name="Gradle: android.arch.lifecycle:livedata-core:1.1.1@aar" level="project" />
+    <orderEntry type="library" name="Gradle: android.arch.core:runtime:1.1.1@aar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:interpolator:28.0.0@aar" level="project" />
     <orderEntry type="library" name="Gradle: com.danikula:videocache:2.7.1@aar" level="project" />
     <orderEntry type="library" name="Gradle: tv.danmaku.ijk.media:ijkplayer-java:0.8.8@aar" level="project" />
     <orderEntry type="module" module-name="proj.android-studio.libcocos2dx" />

+ 15 - 30
.idea/modules/game/proj.android-studio.game.iml

@@ -10,29 +10,29 @@
     </facet>
     <facet type="native-android-gradle" name="Native-Android-Gradle">
       <configuration>
-        <option name="SELECTED_BUILD_VARIANT" value="debug-armeabi-v7a" />
+        <option name="SELECTED_BUILD_VARIANT" value="release-armeabi-v7a" />
       </configuration>
     </facet>
     <facet type="android" name="Android">
       <configuration>
-        <option name="SELECTED_BUILD_VARIANT" value="debug" />
-        <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
-        <option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
+        <option name="SELECTED_BUILD_VARIANT" value="release" />
+        <option name="ASSEMBLE_TASK_NAME" value="assembleRelease" />
+        <option name="COMPILE_JAVA_TASK_NAME" value="compileReleaseSources" />
         <afterSyncTasks>
-          <task>generateDebugSources</task>
+          <task>generateReleaseSources</task>
         </afterSyncTasks>
         <option name="ALLOW_USER_CONFIGURATION" value="false" />
         <option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
-        <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/../../../game/src/main/res;file://$MODULE_DIR$/../../../res;file://$MODULE_DIR$/../../../game/res;file://$MODULE_DIR$/../../../game/src/debug/res;file://$MODULE_DIR$/../../../game/build/generated/res/rs/debug;file://$MODULE_DIR$/../../../game/build/generated/res/resValues/debug" />
-        <option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/../../../game/src/androidTest/res;file://$MODULE_DIR$/../../../game/src/androidTestDebug/res;file://$MODULE_DIR$/../../../game/build/generated/res/rs/androidTest/debug;file://$MODULE_DIR$/../../../game/build/generated/res/resValues/androidTest/debug" />
+        <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/../../../game/src/main/res;file://$MODULE_DIR$/../../../res;file://$MODULE_DIR$/../../../game/res;file://$MODULE_DIR$/../../../game/src/release/res;file://$MODULE_DIR$/../../../game/build/generated/res/rs/release;file://$MODULE_DIR$/../../../game/build/generated/res/resValues/release" />
+        <option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/../../../game/src/androidTest/res" />
         <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
         <option name="PROJECT_TYPE" value="5" />
       </configuration>
     </facet>
   </component>
   <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
-    <output url="file://$MODULE_DIR$/../../../game/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes" />
-    <output-test url="file://$MODULE_DIR$/../../../game/build/intermediates/javac/debugUnitTest/compileDebugUnitTestJavaWithJavac/classes" />
+    <output url="file://$MODULE_DIR$/../../../game/build/intermediates/javac/release/compileReleaseJavaWithJavac/classes" />
+    <output-test url="file://$MODULE_DIR$/../../../game/build/intermediates/javac/releaseUnitTest/compileReleaseUnitTestJavaWithJavac/classes" />
     <exclude-output />
     <content url="file://$MODULE_DIR$/../../../../../../../../../AndroidStudio/sdk/ndk-bundle/sources/android/cpufeatures">
       <sourceFolder url="file://$MODULE_DIR$/../../../../../../../../../AndroidStudio/sdk/ndk-bundle/sources/android/cpufeatures" isTestSource="false" />
@@ -189,11 +189,6 @@
     </content>
     <content url="file://$MODULE_DIR$/../../../game">
       <sourceFolder url="file://$MODULE_DIR$/../../../game/src" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/../../../game/build/generated/res/resValues/debug" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/../../../game/build/generated/source/rs/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/../../../game/build/generated/res/rs/debug" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/../../../game/build/generated/source/apt/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/../../../game/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
       <excludeFolder url="file://$MODULE_DIR$/../../../game/.cxx" />
       <excludeFolder url="file://$MODULE_DIR$/../../../game/.externalNativeBuild" />
       <excludeFolder url="file://$MODULE_DIR$/../../../game/.gradle" />
@@ -202,31 +197,21 @@
     <content url="file://$MODULE_DIR$/../../../jni/hellojavascript">
       <sourceFolder url="file://$MODULE_DIR$/../../../jni/hellojavascript" isTestSource="false" />
     </content>
-    <orderEntry type="jdk" jdkName="Android API 31 Platform" jdkType="Android SDK" />
+    <orderEntry type="jdk" jdkName="Android API 30 Platform" jdkType="Android SDK" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="library" name="Gradle: ./../../../../../../CocosCreator/cocoscreator_ide/CocosCreator_v2.4.0_20200622_win/resources/cocos2d-x/cocos/platform/android/java/libs/com.android.vending.expansion.zipfile.jar" level="project" />
     <orderEntry type="library" name="Gradle: ./../../../../../../CocosCreator/cocoscreator_ide/CocosCreator_v2.4.0_20200622_win/resources/cocos2d-x/cocos/platform/android/java/libs/okhttp-3.12.7.jar" level="project" />
     <orderEntry type="library" name="Gradle: ./../../../../../../CocosCreator/cocoscreator_ide/CocosCreator_v2.4.0_20200622_win/resources/cocos2d-x/cocos/platform/android/java/libs/okio-1.15.0.jar" level="project" />
-    <orderEntry type="library" name="Gradle: com.google.code.gson:gson:2.8.6" level="project" />
     <orderEntry type="library" name="Gradle: org.slf4j:slf4j-android:1.7.21" level="project" />
     <orderEntry type="library" name="Gradle: org.slf4j:slf4j-api:1.7.21" level="project" />
-    <orderEntry type="library" name="Gradle: com.android.support:support-annotations:26.1.0" level="project" />
-    <orderEntry type="library" name="Gradle: android.arch.lifecycle:common:1.0.0" level="project" />
-    <orderEntry type="library" name="Gradle: android.arch.core:common:1.0.0" level="project" />
+    <orderEntry type="library" name="Gradle: ./libs/alipaysdk-15.8.05.211018174351.aar" level="project" />
+    <orderEntry type="library" name="Gradle: ./libs/auth_number_product-2.12.3-log-online-standard-release.aar" level="project" />
+    <orderEntry type="library" name="Gradle: ./libs/crashshield-2.1.2-release.aar" level="project" />
+    <orderEntry type="library" name="Gradle: ./libs/logger-2.1.2-release.aar" level="project" />
+    <orderEntry type="library" name="Gradle: ./libs/main-2.1.2-release.aar" level="project" />
     <orderEntry type="library" name="Gradle: com.google.android.instantapps:instantapps:1.1.0@aar" level="project" />
-    <orderEntry type="library" name="Gradle: com.google.android.gms:play-services-instantapps:16.0.0@aar" level="project" />
-    <orderEntry type="library" name="Gradle: com.google.android.gms:play-services-base:15.0.1@aar" level="project" />
-    <orderEntry type="library" name="Gradle: com.google.android.gms:play-services-tasks:15.0.1@aar" level="project" />
-    <orderEntry type="library" name="Gradle: com.google.android.gms:play-services-basement:15.0.1@aar" level="project" />
     <orderEntry type="library" name="Gradle: com.danikula:videocache:2.7.1@aar" level="project" />
     <orderEntry type="library" name="Gradle: tv.danmaku.ijk.media:ijkplayer-java:0.8.8@aar" level="project" />
-    <orderEntry type="library" name="Gradle: com.android.support:support-v4:26.1.0@aar" level="project" />
-    <orderEntry type="library" name="Gradle: com.android.support:support-media-compat:26.1.0@aar" level="project" />
-    <orderEntry type="library" name="Gradle: com.android.support:support-fragment:26.1.0@aar" level="project" />
-    <orderEntry type="library" name="Gradle: com.android.support:support-core-utils:26.1.0@aar" level="project" />
-    <orderEntry type="library" name="Gradle: com.android.support:support-core-ui:26.1.0@aar" level="project" />
-    <orderEntry type="library" name="Gradle: com.android.support:support-compat:26.1.0@aar" level="project" />
-    <orderEntry type="library" name="Gradle: android.arch.lifecycle:runtime:1.0.0@aar" level="project" />
     <orderEntry type="module" module-name="proj.android-studio.libcocos2dx" />
   </component>
 </module>

+ 5 - 5
.idea/modules/instantapp/proj.android-studio.instantapp.iml

@@ -10,16 +10,16 @@
     </facet>
     <facet type="android" name="Android">
       <configuration>
-        <option name="SELECTED_BUILD_VARIANT" value="debug" />
-        <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
-        <option name="COMPILE_JAVA_TASK_NAME" value="dummyDebug" />
+        <option name="SELECTED_BUILD_VARIANT" value="release" />
+        <option name="ASSEMBLE_TASK_NAME" value="assembleRelease" />
+        <option name="COMPILE_JAVA_TASK_NAME" value="dummyRelease" />
         <afterSyncTasks>
-          <task>dummyDebug</task>
+          <task>dummyRelease</task>
         </afterSyncTasks>
         <option name="ALLOW_USER_CONFIGURATION" value="false" />
         <option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
         <option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
-        <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/../../../instantapp/src/main/res;file://$MODULE_DIR$/../../../instantapp/src/debug/res" />
+        <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/../../../instantapp/src/main/res;file://$MODULE_DIR$/../../../instantapp/src/release/res" />
         <option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="" />
         <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
         <option name="PROJECT_TYPE" value="4" />

+ 20 - 0
.idea/proj.android-studio.iml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module external.linked.project.id="proj.android-studio" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="java-gradle" name="Java-Gradle">
+      <configuration>
+        <option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
+        <option name="BUILDABLE" value="false" />
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <excludeFolder url="file://$MODULE_DIR$/.gradle" />
+      <excludeFolder url="file://$MODULE_DIR$/build" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

File diff suppressed because it is too large
+ 735 - 735
app/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/android_gradle_build.json


File diff suppressed because it is too large
+ 10 - 10
app/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/android_gradle_build_mini.json


+ 1 - 2
app/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/ndkBuild_build_command.txt

@@ -6,13 +6,12 @@ NDK_APPLICATION_MK=G:\WorkSpace\efunbox-build\jsb-link\frameworks\runtime-src\pr
 APP_ABI=armeabi-v7a
 NDK_ALL_ABIS=armeabi-v7a
 NDK_DEBUG=1
-APP_PLATFORM=android-21
+APP_PLATFORM=android-16
 NDK_OUT=G:/WorkSpace/efunbox-build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj
 NDK_LIBS_OUT=G:\WorkSpace\efunbox-build\jsb-link\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\debug\lib
 NDK_TOOLCHAIN_VERSION=clang
 NDK_MODULE_PATH=G:\CocosCreator\cocoscreator_ide\CocosCreator_v2.4.0_20200622_win\resources\cocos2d-x;G:\CocosCreator\cocoscreator_ide\CocosCreator_v2.4.0_20200622_win\resources\cocos2d-x\cocos;G:\CocosCreator\cocoscreator_ide\CocosCreator_v2.4.0_20200622_win\resources\cocos2d-x\external
 -j8
-NDK_DEBUG=1
 APP_SHORT_COMMANDS=false
 LOCAL_SHORT_COMMANDS=false
 -B

File diff suppressed because it is too large
+ 738 - 365
app/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/ndkBuild_build_output.txt


File diff suppressed because it is too large
+ 735 - 735
app/.externalNativeBuild/ndkBuild/release/armeabi-v7a/android_gradle_build.json


File diff suppressed because it is too large
+ 10 - 10
app/.externalNativeBuild/ndkBuild/release/armeabi-v7a/android_gradle_build_mini.json


+ 1 - 1
app/.externalNativeBuild/ndkBuild/release/armeabi-v7a/ndkBuild_build_command.txt

@@ -6,7 +6,7 @@ NDK_APPLICATION_MK=G:\WorkSpace\efunbox-build\jsb-link\frameworks\runtime-src\pr
 APP_ABI=armeabi-v7a
 NDK_ALL_ABIS=armeabi-v7a
 NDK_DEBUG=0
-APP_PLATFORM=android-21
+APP_PLATFORM=android-16
 NDK_OUT=G:/WorkSpace/efunbox-build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj
 NDK_LIBS_OUT=G:\WorkSpace\efunbox-build\jsb-link\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\release\lib
 NDK_TOOLCHAIN_VERSION=clang

File diff suppressed because it is too large
+ 738 - 365
app/.externalNativeBuild/ndkBuild/release/armeabi-v7a/ndkBuild_build_output.txt


+ 55 - 1
app/AndroidManifest.xml

@@ -1,14 +1,26 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-        package="com.edufound.ott.launcher"
+        package="com.edufound.mobile"
         android:installLocation="auto">
 
     <uses-feature android:glEsVersion="0x00020000" />
 
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
     <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
+    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /><!-- 切换⽹络通道 -->
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /><!-- 本地信息缓存 -->
+    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <!--开关wifi状态,解决国内机型移动⽹络权限问题需要 -->
+
+<!--    <queries>-->
+<!--        &lt;!&ndash; 正式环境 &ndash;&gt;-->
+<!--        <package android:name="com.eg.android.AlipayGphone" />-->
+<!--        &lt;!&ndash; 沙箱环境 &ndash;&gt;-->
+<!--        <package android:name="com.eg.android.AlipayGphoneRC" />-->
+<!--        <package android:name="hk.alipay.wallet" />-->
+<!--    </queries>-->
 
     <application
             android:name="org.cocos2dx.javascript.application.EApplication"
@@ -35,6 +47,48 @@
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
+
+
+        <!--联通电信授权页-->
+        <!--如果不需要使用窗口模式,不要使用authsdk_activity_dialog主题,会出现异常动画-->
+        <!--如果需要使用authsdk_activity_dialog主题,则screenOrientation一定不能指定明确的方向,
+               比如portrait、sensorPortrait,在8.0的系统上不允许窗口模式指定orientation,会发生crash,需要指定为behind,
+               然后在授权页的前一个页面指定具体的orientation-->
+        <activity
+                android:name="com.mobile.auth.gatewayauth.LoginAuthActivity"
+                android:configChanges="orientation|keyboardHidden|screenSize"
+                android:exported="false"
+                android:launchMode="singleTop"
+                android:theme="@style/authsdk_activity_dialog" />
+        <!--协议页面webview-->
+        <activity
+                android:name="com.mobile.auth.gatewayauth.activity.AuthWebVeiwActivity"
+                android:configChanges="orientation|keyboardHidden|screenSize"
+                android:exported="false"
+                android:launchMode="singleTop"
+                android:screenOrientation="behind" />
+        <!--移动授权页-->
+        <activity
+                android:name="com.cmic.sso.sdk.activity.LoginAuthActivity"
+                android:configChanges="orientation|keyboardHidden|screenSize"
+                android:exported="false"
+                android:launchMode="singleTop" />
+
+        <activity
+                android:name=".wxapi.WXEntryActivity"
+                android:exported="true"
+                android:launchMode="singleTask"
+                android:screenOrientation="landscape"
+                android:taskAffinity="com.edufound.android.xyyf"
+                android:theme="@style/transcutestyle"></activity>
+
+        <activity
+                android:name=".wxapi.WXPayEntryActivity"
+                android:exported="true"
+                android:screenOrientation="landscape"
+                android:theme="@style/transcutestyle">
+
+        </activity>
     </application>
 
 </manifest>

+ 20 - 12
app/build.gradle

@@ -7,13 +7,16 @@ android {
     buildToolsVersion PROP_BUILD_TOOLS_VERSION
 
     defaultConfig {
-        applicationId "com.edufound.ott.launcher"
+        applicationId "com.edufound.mobile"
         minSdkVersion PROP_MIN_SDK_VERSION
         targetSdkVersion PROP_TARGET_SDK_VERSION
         versionCode 91000
         versionName "9.1"
-
+        ndk {
+            abiFilters 'armeabi-v7a'
+        }
         externalNativeBuild {
+
             ndkBuild {
                 if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE.compareTo('none') != 0) {
                     // skip the NDK Build step if PROP_NDK_MODE is none
@@ -83,16 +86,16 @@ android {
             }
         }
 
-        debug {
-            debuggable true
-            jniDebuggable true
-            renderscriptDebuggable true
-            externalNativeBuild {
-                ndkBuild {
-                    arguments 'NDK_DEBUG=1'
-                }
-            }
-        }
+//        debug {
+//            debuggable true
+//            jniDebuggable true
+//            renderscriptDebuggable true
+//            externalNativeBuild {
+//                ndkBuild {
+//                    arguments 'NDK_DEBUG=1'
+//                }
+//            }
+//        }
     }
 }
 
@@ -129,7 +132,12 @@ android.applicationVariants.all { variant ->
 dependencies {
     implementation fileTree(dir: '../libs', include: ['*.jar', '*.aar'])
     implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
+    implementation "com.android.support:appcompat-v7:28.0.0"
     implementation fileTree(dir: "G:/CocosCreator/cocoscreator_ide/CocosCreator_v2.4.0_20200622_win/resources/cocos2d-x/cocos/platform/android/java/libs", include: ['*.jar'])
+    implementation 'com.google.code.gson:gson:2.8.6'
+    implementation 'com.google.android.gms:play-services-instantapps:16.0.0'
+    //微信登录、微信支付等
+    implementation "com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+"
     implementation project(':libcocos2dx')
 
 }

+ 71 - 0
app/src/com/edufound/mobile/wxapi/WXEntryActivity.java

@@ -0,0 +1,71 @@
+package com.edufound.mobile.wxapi;
+
+import android.app.Activity;
+import android.os.Build;
+import android.os.Bundle;
+import android.support.annotation.RequiresApi;
+import android.view.WindowManager;
+
+import com.tencent.mm.opensdk.constants.ConstantsAPI;
+import com.tencent.mm.opensdk.modelbase.BaseReq;
+import com.tencent.mm.opensdk.modelbase.BaseResp;
+import com.tencent.mm.opensdk.modelmsg.SendAuth;
+import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
+
+
+public class WXEntryActivity extends Activity implements IWXAPIEventHandler {
+
+
+    @RequiresApi(api = Build.VERSION_CODES.P)
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
+                WindowManager.LayoutParams.FLAG_FULLSCREEN);
+
+
+    }
+
+    @Override
+    public void onReq(BaseReq baseReq) {
+    }
+
+    //请求回调结果处理
+    @Override
+    public void onResp(BaseResp baseResp) {
+        if (baseResp.getType() == ConstantsAPI.COMMAND_LAUNCH_WX_MINIPROGRAM) {
+//            WXLaunchMiniProgram.Resp launchMiniProResp = (WXLaunchMiniProgram.Resp) baseResp;
+//            String extraData = launchMiniProResp.extMsg; //对应小程序组件 <button open-type="launchApp"> 中的 app-parameter 属性
+//            MainActivity.mIntences.mWebView.loadUrl("javascript:appDispatch('" + extraData + "')");
+//            Intent intent = new Intent(mActivity, MainActivity.class);
+//            startActivity(intent);
+//            finish();
+        } else {
+            switch (baseResp.errCode) {
+                case BaseResp.ErrCode.ERR_OK:
+                    String code = ((SendAuth.Resp) baseResp).code;
+                    //获取用户信息
+                    break;
+                case BaseResp.ErrCode.ERR_AUTH_DENIED://用户拒绝授权
+                    finish();
+                    break;
+                case BaseResp.ErrCode.ERR_USER_CANCEL://用户取消
+                    finish();
+                    break;
+                default:
+                    finish();
+                    break;
+            }
+        }
+
+    }
+
+
+    @Override
+    protected void onPause() {
+        overridePendingTransition(0, 0);
+        super.onPause();
+    }
+
+
+}

+ 87 - 0
app/src/com/edufound/mobile/wxapi/WXPayEntryActivity.java

@@ -0,0 +1,87 @@
+package com.edufound.mobile.wxapi;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.Message;
+
+import com.google.gson.Gson;
+import com.tencent.mm.opensdk.constants.ConstantsAPI;
+import com.tencent.mm.opensdk.modelbase.BaseReq;
+import com.tencent.mm.opensdk.modelbase.BaseResp;
+import com.tencent.mm.opensdk.openapi.IWXAPI;
+import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
+import com.tencent.mm.opensdk.openapi.WXAPIFactory;
+
+import org.cocos2dx.javascript.presenter.MainPresenter;
+import org.cocos2dx.javascript.util.Logger;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class WXPayEntryActivity extends Activity implements IWXAPIEventHandler {
+
+    private static final String TAG = WXPayEntryActivity.class.getSimpleName();
+
+    private IWXAPI api;
+    Gson mGson;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        api = WXAPIFactory.createWXAPI(this, MainPresenter.WX_APPID);
+        api.handleIntent(getIntent(), this);
+        mGson = new Gson();
+
+    }
+
+    @Override
+    protected void onNewIntent(Intent intent) {
+        super.onNewIntent(intent);
+        setIntent(intent);
+        api.handleIntent(intent, this);
+    }
+
+    @Override
+    public void onReq(BaseReq baseReq) {
+        Logger.e("onReq-onReq--onReq--onReq--onReq");
+    }
+
+    @Override
+    public void onResp(BaseResp baseResp) {
+        if (baseResp.getType() == ConstantsAPI.COMMAND_PAY_BY_WX) {
+            if (baseResp.errCode == 0) {// 支付成功
+//                CustomToast.showToast(this, "支付成功", 3000);
+                Logger.e("支付成功");
+            } else if (baseResp.errCode == -2) {// 用户取消支付
+//                CustomToast.showToast(this, "支付已取消", 3000);
+                Logger.e("用户取消支付");
+            } else {// 支付失败
+                Logger.e("支付失败");
+//                CustomToast.showToast(this, "支付失败:" + baseResp.errCode + "--:baseResp.errStr" + baseResp.errStr, 3000);
+            }
+            payBack bean = new payBack(baseResp.errCode, baseResp.errStr != null ? baseResp.errStr : "", baseResp.transaction != null ? baseResp.transaction : "", baseResp.openId != null ? baseResp.openId : "");
+            Message msg = new Message();
+            msg.what = 0xffbcd13;
+            msg.obj = bean;
+            MainPresenter.resultHandler.sendMessage(msg);
+            Logger.e("关闭界面!");
+
+        }
+        finish();
+    }
+
+    public class payBack {
+        public int errorCode;
+        public String errStr;
+        public String transaction;
+        public String openId;
+
+        payBack(int errorCode, String errStr, String transaction, String openId) {
+            this.errorCode = errorCode;
+            this.errStr = errStr;
+            this.transaction = transaction;
+            this.openId = openId;
+        }
+    }
+}

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

@@ -21,4 +21,19 @@
         <item name="android:windowFullscreen">true</item>
     </style>
 
+    <style name="transcutestyle" parent="@android:style/Theme.DeviceDefault.Dialog">
+        <!-- 边框 -->
+        <item name="android:windowFrame">@android:color/transparent</item>
+        <!-- 是否浮现在activity之上 -->
+        <item name="android:windowIsFloating">true</item>
+        <!-- 半透明 -->
+        <item name="android:windowIsTranslucent">true</item>
+        <!-- 无标题 -->
+        <item name="android:windowNoTitle">true</item>
+        <!-- 背景透明 -->
+        <item name="android:windowBackground">@android:color/transparent</item>
+        <item name="android:backgroundDimAmount">0.1</item>
+        <item name="android:windowAnimationStyle">@null</item>
+    </style>
+
 </resources>

File diff suppressed because it is too large
+ 735 - 735
game/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/android_gradle_build.json


File diff suppressed because it is too large
+ 10 - 10
game/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/android_gradle_build_mini.json


+ 1 - 1
game/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/ndkBuild_build_command.txt

@@ -6,7 +6,7 @@ NDK_APPLICATION_MK=G:\WorkSpace\efunbox-build\jsb-link\frameworks\runtime-src\pr
 APP_ABI=armeabi-v7a
 NDK_ALL_ABIS=armeabi-v7a
 NDK_DEBUG=1
-APP_PLATFORM=android-21
+APP_PLATFORM=android-16
 NDK_OUT=G:/WorkSpace/efunbox-build/jsb-link/frameworks/runtime-src/proj.android-studio/game/build/intermediates/ndkBuild/debug/obj
 NDK_LIBS_OUT=G:\WorkSpace\efunbox-build\jsb-link\frameworks\runtime-src\proj.android-studio\game\build\intermediates\ndkBuild\debug\lib
 NDK_TOOLCHAIN_VERSION=clang

File diff suppressed because it is too large
+ 366 - 365
game/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/ndkBuild_build_output.txt


File diff suppressed because it is too large
+ 735 - 735
game/.externalNativeBuild/ndkBuild/debugFeature/armeabi-v7a/android_gradle_build.json


File diff suppressed because it is too large
+ 10 - 10
game/.externalNativeBuild/ndkBuild/debugFeature/armeabi-v7a/android_gradle_build_mini.json


+ 1 - 1
game/.externalNativeBuild/ndkBuild/debugFeature/armeabi-v7a/ndkBuild_build_command.txt

@@ -6,7 +6,7 @@ NDK_APPLICATION_MK=G:\WorkSpace\efunbox-build\jsb-link\frameworks\runtime-src\pr
 APP_ABI=armeabi-v7a
 NDK_ALL_ABIS=armeabi-v7a
 NDK_DEBUG=1
-APP_PLATFORM=android-21
+APP_PLATFORM=android-16
 NDK_OUT=G:/WorkSpace/efunbox-build/jsb-link/frameworks/runtime-src/proj.android-studio/game/build/intermediates/ndkBuild/feature/debug/obj
 NDK_LIBS_OUT=G:\WorkSpace\efunbox-build\jsb-link\frameworks\runtime-src\proj.android-studio\game\build\intermediates\ndkBuild\feature\debug\lib
 NDK_TOOLCHAIN_VERSION=clang

File diff suppressed because it is too large
+ 366 - 365
game/.externalNativeBuild/ndkBuild/debugFeature/armeabi-v7a/ndkBuild_build_output.txt


File diff suppressed because it is too large
+ 735 - 735
game/.externalNativeBuild/ndkBuild/release/armeabi-v7a/android_gradle_build.json


File diff suppressed because it is too large
+ 10 - 10
game/.externalNativeBuild/ndkBuild/release/armeabi-v7a/android_gradle_build_mini.json


+ 1 - 1
game/.externalNativeBuild/ndkBuild/release/armeabi-v7a/ndkBuild_build_command.txt

@@ -6,7 +6,7 @@ NDK_APPLICATION_MK=G:\WorkSpace\efunbox-build\jsb-link\frameworks\runtime-src\pr
 APP_ABI=armeabi-v7a
 NDK_ALL_ABIS=armeabi-v7a
 NDK_DEBUG=0
-APP_PLATFORM=android-21
+APP_PLATFORM=android-16
 NDK_OUT=G:/WorkSpace/efunbox-build/jsb-link/frameworks/runtime-src/proj.android-studio/game/build/intermediates/ndkBuild/release/obj
 NDK_LIBS_OUT=G:\WorkSpace\efunbox-build\jsb-link\frameworks\runtime-src\proj.android-studio\game\build\intermediates\ndkBuild\release\lib
 NDK_TOOLCHAIN_VERSION=clang

File diff suppressed because it is too large
+ 366 - 365
game/.externalNativeBuild/ndkBuild/release/armeabi-v7a/ndkBuild_build_output.txt


File diff suppressed because it is too large
+ 735 - 735
game/.externalNativeBuild/ndkBuild/releaseFeature/armeabi-v7a/android_gradle_build.json


File diff suppressed because it is too large
+ 10 - 10
game/.externalNativeBuild/ndkBuild/releaseFeature/armeabi-v7a/android_gradle_build_mini.json


+ 1 - 1
game/.externalNativeBuild/ndkBuild/releaseFeature/armeabi-v7a/ndkBuild_build_command.txt

@@ -6,7 +6,7 @@ NDK_APPLICATION_MK=G:\WorkSpace\efunbox-build\jsb-link\frameworks\runtime-src\pr
 APP_ABI=armeabi-v7a
 NDK_ALL_ABIS=armeabi-v7a
 NDK_DEBUG=0
-APP_PLATFORM=android-21
+APP_PLATFORM=android-16
 NDK_OUT=G:/WorkSpace/efunbox-build/jsb-link/frameworks/runtime-src/proj.android-studio/game/build/intermediates/ndkBuild/feature/release/obj
 NDK_LIBS_OUT=G:\WorkSpace\efunbox-build\jsb-link\frameworks\runtime-src\proj.android-studio\game\build\intermediates\ndkBuild\feature\release\lib
 NDK_TOOLCHAIN_VERSION=clang

File diff suppressed because it is too large
+ 366 - 365
game/.externalNativeBuild/ndkBuild/releaseFeature/armeabi-v7a/ndkBuild_build_output.txt


+ 5 - 6
game/build.gradle

@@ -1,4 +1,5 @@
 import org.apache.tools.ant.taskdefs.condition.Os
+
 apply plugin: 'com.android.feature'
 android {
     baseFeature true
@@ -23,13 +24,12 @@ android {
                                         project.file("G:/CocosCreator/cocoscreator_ide/CocosCreator_v2.4.0_20200622_win/resources/cocos2d-x/external")]
                     if (Os.isFamily(Os.FAMILY_WINDOWS)) {
                         arguments 'NDK_MODULE_PATH=' + module_paths.join(";")
-                    }
-                    else {
+                    } else {
                         arguments 'NDK_MODULE_PATH=' + module_paths.join(':')
                     }
 
                     arguments '-j' + Runtime.runtime.availableProcessors()
-                    abiFilters.addAll(PROP_APP_ABI.split(':').collect{it as String})
+                    abiFilters.addAll(PROP_APP_ABI.split(':').collect { it as String })
                 }
             }
         }
@@ -127,10 +127,9 @@ android.featureVariants.all { variant ->
 }
 
 dependencies {
-    implementation fileTree(dir: '../libs', include: ['*.jar','*.aar'])
-    implementation fileTree(dir: 'libs', include: ['*.jar','*.aar'])
+    implementation fileTree(dir: '../libs', include: ['*.jar', '*.aar'])
+    implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
     implementation fileTree(dir: "G:/CocosCreator/cocoscreator_ide/CocosCreator_v2.4.0_20200622_win/resources/cocos2d-x/cocos/platform/android/java/libs", include: ['*.jar'])
     implementation 'com.google.android.instantapps:instantapps:1.1.0'
-    implementation 'com.google.android.gms:play-services-instantapps:16.0.0'
     implementation project(':libcocos2dx')
 }

+ 6 - 6
gradle.properties

@@ -15,21 +15,21 @@
 # Android SDK version that will be used as the compile project
 PROP_COMPILE_SDK_VERSION=31
 # Android SDK version that will be used as the earliest version of android this application can run on
-PROP_MIN_SDK_VERSION=21
+PROP_MIN_SDK_VERSION=16
 # Android SDK version that will be used as the latest version of android this application has been tested on
 PROP_TARGET_SDK_VERSION=31
 # Android Build Tools version that will be used as the compile project
-PROP_BUILD_TOOLS_VERSION=28.0.3
+PROP_BUILD_TOOLS_VERSION=30
 # List of CPU Archtexture to build that application with
 # Available architextures (armeabi-v7a | arm64-v8a | x86)
 # To build for multiple architexture, use the `:` between them
 # Example - PROP_APP_ABI=armeabi-v7a
 PROP_APP_ABI=armeabi-v7a
 # fill in sign information for release mode
-RELEASE_STORE_FILE=G:/CocosCreator/cocoscreator_ide/CocosCreator_v2.4.0_20200622_win/resources/static/build-templates/native/debug.keystore
-RELEASE_STORE_PASSWORD=123456
-RELEASE_KEY_ALIAS=debug_keystore
-RELEASE_KEY_PASSWORD=123456
+RELEASE_STORE_FILE=C:/Users/Candy/Desktop/edufound.keystore
+RELEASE_STORE_PASSWORD=edufound123
+RELEASE_KEY_ALIAS=edufound_key
+RELEASE_KEY_PASSWORD=edufound321
 android.injected.testOnly=false
 android.useAndroidX=true
 android.enableJetifier=false

二進制
libs/alipaysdk-15.8.05.211018174351.aar


二進制
libs/auth_number_product-2.12.3-log-online-standard-release.aar


二進制
libs/crashshield-2.1.2-release.aar


二進制
libs/logger-2.1.2-release.aar


二進制
libs/main-2.1.2-release.aar


+ 21 - 9
src/org/cocos2dx/javascript/AppActivity.java

@@ -24,23 +24,28 @@
  ****************************************************************************/
 package org.cocos2dx.javascript;
 
-import org.cocos2dx.javascript.presenter.MainPresenter;
-import org.cocos2dx.lib.Cocos2dxActivity;
-import org.cocos2dx.lib.Cocos2dxGLSurfaceView;
-
 import android.annotation.SuppressLint;
-import android.graphics.PixelFormat;
-import android.os.Bundle;
-
 import android.content.Intent;
 import android.content.res.Configuration;
+import android.graphics.PixelFormat;
+import android.os.Bundle;
 import android.view.KeyEvent;
 import android.view.View;
 import android.view.WindowManager;
 import android.widget.FrameLayout;
 import android.widget.ImageView;
 
-import com.edufound.ott.launcher.R;
+import com.edufound.mobile.R;
+import com.google.gson.Gson;
+
+import org.cocos2dx.javascript.presenter.MainPresenter;
+import org.cocos2dx.javascript.util.Logger;
+import org.cocos2dx.lib.Cocos2dxActivity;
+import org.cocos2dx.lib.Cocos2dxGLSurfaceView;
+
+import java.util.HashMap;
+import java.util.Map;
+
 
 public class AppActivity extends Cocos2dxActivity {
 
@@ -65,7 +70,14 @@ public class AppActivity extends Cocos2dxActivity {
         SDKWrapper.getInstance().init(this);
         showSplash();
         mPresenter = new MainPresenter(this);
-
+        Map<String, String> map = new HashMap<>();
+        map.put("sd", "1");
+        map.put("sd1", "11");
+        map.put("sd11", "111");
+        map.put("sd111", "1111");
+        Gson gson = new Gson();
+        String json = gson.toJson(map);
+        Logger.e("测试json:" + json);
     }
 
     @SuppressLint("ResourceType")

File diff suppressed because it is too large
+ 1 - 0
src/org/cocos2dx/javascript/bean/AliPayResult.java


+ 227 - 0
src/org/cocos2dx/javascript/presenter/MainPresenter.java

@@ -1,22 +1,53 @@
 package org.cocos2dx.javascript.presenter;
 
+import android.os.Handler;
+import android.os.Message;
 import android.os.Process;
+import android.support.annotation.NonNull;
+import android.text.TextUtils;
 import android.view.KeyEvent;
+import android.webkit.JavascriptInterface;
 import android.widget.Toast;
 
+import com.alipay.sdk.app.PayTask;
+import com.edufound.mobile.wxapi.WXPayEntryActivity;
 import com.google.gson.Gson;
+import com.mobile.auth.gatewayauth.PhoneNumberAuthHelper;
+import com.mobile.auth.gatewayauth.TokenResultListener;
+import com.tencent.mm.opensdk.modelbiz.WXLaunchMiniProgram;
+import com.tencent.mm.opensdk.modelpay.PayReq;
+import com.tencent.mm.opensdk.openapi.IWXAPI;
+import com.tencent.mm.opensdk.openapi.WXAPIFactory;
 
 import org.cocos2dx.javascript.AppActivity;
+import org.cocos2dx.javascript.bean.AliPayResult;
+import org.cocos2dx.javascript.util.Consts;
 import org.cocos2dx.javascript.util.DeviceUtil;
+import org.cocos2dx.javascript.util.DeviceUuidFactory;
 import org.cocos2dx.javascript.util.Logger;
 import org.cocos2dx.javascript.util.PackageUtil;
 import org.cocos2dx.lib.Cocos2dxJavascriptJavaBridge;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.cocos2dx.lib.Cocos2dxHelper.runOnGLThread;
 
 public class MainPresenter {
     private static AppActivity mActivity;
     private static DeviceUtil mDeviceUtil;
     private static PackageUtil mPackageUtil;
     private static Gson mGson;
+    private static boolean autoLogin;
+    PhoneNumberAuthHelper mPhoneNumberAuthHelper;
+    private static String loginToken;
+    //微信api
+    private static IWXAPI WX_API;
+    //微信appid
+    public static String WX_APPID = "wx51acc19c8f7a0f6f";
+    public static String WX_SECRET = "e830d45f497025041269ef6221140c3d";
 
     public MainPresenter(AppActivity activity) {
         mActivity = activity;
@@ -25,8 +56,28 @@ public class MainPresenter {
         Logger.e("getWidth:" + mDeviceUtil.getWidth(mActivity));
         Logger.e("getHeight:" + mDeviceUtil.getHeight(mActivity));
         mPackageUtil = new PackageUtil(activity);
+        new DeviceUuidFactory(Consts.mApplicatonContext);
+        mPhoneNumberAuthHelper = PhoneNumberAuthHelper.getInstance(mActivity, mTokenResultListener);
+        mPhoneNumberAuthHelper.setAuthSDKInfo("BzFbe8Ud13a0fixI18bD2CRzO5U7iz4Xf7hS5aiftwGJLOBypQraiKdFd5IHgK9wTYW9Plr6+m8pH3cHqSjCOImr8HXf3NYTUCOyePsoUaKrX9qQGIbSZ7KvVMoyUY0FIUsA4hXiv873ZS6uIdMg5aU2Xx9hh+y0bAbsl0PnXQOShlZ/sdyRj8JiQibEel6LlvwFiy5f3l3ML3ojVvCNVhe6aH4f/Plx5hBcRRIf5Bv3oAY6FY6n6pNwNmCLUDRiy2A3bWp2gH6N6uTTaOZi308ylelFPZ17");
+        mPhoneNumberAuthHelper.checkEnvAvailable(2);
+        WX_API = WXAPIFactory.createWXAPI(Consts.mApplicatonContext, WX_APPID);
+        WX_API.registerApp(WX_APPID);
+//        mPhoneNumberAuthHelper.getVerifyToken(5000);
+//        handler.sendEmptyMessageDelayed(1, 5000);
     }
 
+    Handler handler = new Handler(new Handler.Callback() {
+        @Override
+        public boolean handleMessage(@NonNull Message message) {
+            switch (message.what) {
+                case 1:
+                    mPhoneNumberAuthHelper.getLoginToken(mActivity, 5000);
+                    break;
+            }
+            return false;
+        }
+    });
+
     public static String getVersionCode() {
         return mDeviceUtil.getVersionCode(mActivity);
     }
@@ -40,6 +91,7 @@ public class MainPresenter {
         });
     }
 
+
     public static String getSystemAppsJson() {
         return mGson.toJson(mPackageUtil.getSystemAppList()).toString();
     }
@@ -83,6 +135,71 @@ public class MainPresenter {
     }
 
 
+    //返回一键登录初始化成功还是失败
+    public static String getAutoLoginSuccess() {
+        Logger.e("autoLogin:" + autoLogin);
+        return String.valueOf(autoLogin);
+    }
+
+    //返回deviceCode
+    public static String getLoginToken() {
+        Logger.e("getLoginToken:" + loginToken);
+        return loginToken;
+    }
+
+
+    //返回deviceCode
+    public static String getDeviceCode() {
+        Logger.e("调用getDeviceCode:" + DeviceUuidFactory.getUuid().toString());
+        return DeviceUuidFactory.getUuid().toString();
+    }
+
+
+    public static void WeChatPay(String json) {
+        Logger.e("WeChatPay:json-" + json);
+        if (!WX_API.isWXAppInstalled()) {
+            Toast.makeText(mActivity, "请安装微信", Toast.LENGTH_SHORT).show();
+            return;
+        }
+        Message msg = new Message();
+        msg.obj = json;
+        msg.what = 0xffbcd14;
+        resultHandler.sendMessageDelayed(msg, 0);
+    }
+
+
+    public static void ALIPay(final String orderInfo) {
+        Logger.e("orderInfo:" + orderInfo);
+        Runnable payRunnable = new Runnable() {
+            @Override
+            public void run() {
+                PayTask alipay = new PayTask(mActivity);
+                Map<String, String> result = alipay.payV2(orderInfo, true);
+                Message msg = new Message();
+                msg.what = 0xffbcd15;
+                msg.obj = result;
+                resultHandler.sendMessage(msg);
+            }
+        };
+        Thread payThread = new Thread(payRunnable);
+        payThread.start();
+    }
+
+
+    @JavascriptInterface
+    public void toMiniProgram(String programId, String path) {
+        Logger.e("toMiniProgram:programId-" + programId + "--path:" + path);
+        if (!WX_API.isWXAppInstalled()) {
+            Toast.makeText(mActivity, "请安装微信", Toast.LENGTH_SHORT).show();
+            return;
+        }
+        WXLaunchMiniProgram.Req req = new WXLaunchMiniProgram.Req();
+        req.userName = programId; // 填小程序原始id
+        req.path = path;                  //拉起小程序页面的可带参路径,不填默认拉起小程序首页
+        req.miniprogramType = WXLaunchMiniProgram.Req.MINIPTOGRAM_TYPE_RELEASE;// 可选打开 开发版,体验版和正式版
+        WX_API.sendReq(req);
+    }
+
     public boolean onKeyDown(int keyCode, KeyEvent event) {
         switch (keyCode) {
             case KeyEvent.KEYCODE_BACK:
@@ -98,4 +215,114 @@ public class MainPresenter {
         return false;
     }
 
+    TokenResultListener mTokenResultListener = new TokenResultListener() {
+        @Override
+        public void onTokenSuccess(String json) {
+            Logger.e("onTokenSuccess:" + json);
+            try {
+                JSONObject object = new JSONObject(json);
+                String code = object.getString("code");
+                autoLogin = true;
+                loginToken = object.getString("token");
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }
+
+        @Override
+        public void onTokenFailed(String json) {
+            Logger.e("onTokenFailed:" + json);
+            try {
+                JSONObject object = new JSONObject(json);
+                int code = Integer.valueOf(object.getString("code"));
+                switch (code) {
+                    case 700000:
+                    case 700001:
+                    case 700002:
+                    case 700003:
+                    case 700004:
+                        break;
+                    default:
+                        autoLogin = false;
+                        break;
+                }
+//                Toast.makeText(mActivity, "errorCode:" + object.getString("code") + "--errorMsg:" + object.getString("msg"), Toast.LENGTH_LONG).show();
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+
+        }
+    };
+
+
+    public static Handler resultHandler = new Handler(new Handler.Callback() {
+        @Override
+        public boolean handleMessage(Message msg) {
+            switch (msg.what) {
+                case 0xffbcd13:
+                    //微信回参回调
+                    WXPayEntryActivity.payBack bean = (WXPayEntryActivity.payBack) msg.obj;
+                    Map<String, String> map = new HashMap<>();
+                    map.put("errorCode", bean.errorCode + "");
+                    map.put("errStr", bean.errStr);
+                    map.put("transaction", bean.transaction);
+                    map.put("openId", bean.openId);
+                    final String wechatCallBackJson = mGson.toJson(map);
+                    mActivity.runOnGLThread(new Runnable() {
+                        @Override
+                        public void run() {
+                            Cocos2dxJavascriptJavaBridge.evalString("PUBLIC.WeChatPayCallBack('" + wechatCallBackJson + "')");
+                        }
+                    });
+                    break;
+                case 0xffbcd14:
+                    //微信支付
+                    try {
+                        String jsonmessage = msg.obj.toString();
+                        if (jsonmessage != null && jsonmessage.length() > 0) {
+                            JSONObject json = new JSONObject(jsonmessage);
+                            if (null != json) {
+                                PayReq req = new PayReq();
+                                req.appId = json.getString("appid");
+                                req.partnerId = json.getString("partnerid");
+                                req.prepayId = json.getString("prepayid");
+                                req.nonceStr = json.getString("noncestr");
+                                req.timeStamp = json.getString("timestamp");
+                                req.packageValue = json.getString("package");
+                                req.sign = json.getString("sign");
+                                Logger.e("req-json:" + mGson.toJson(req));
+                                WX_API.sendReq(req);
+                            } else {
+                                Logger.e("返回错误" + json.getString("retmsg"));
+                            }
+                        } else {
+                            Logger.e("服务器请求错误");
+                        }
+                    } catch (Exception e) {
+                        Logger.e("异常:" + e.getMessage());
+                    }
+                    break;
+                case 0xffbcd15:
+                    //支付宝支付
+                    AliPayResult payResult = new AliPayResult((Map<String, String>) msg.obj);
+                    final String resultInfo = payResult.getResult();// 同步返回需要验证的信息
+                    final String resultStatus = payResult.getResultStatus();
+                    if (resultStatus.equals("4000")) {
+                        Toast.makeText(mActivity, "未找到支付宝客户端", Toast.LENGTH_SHORT).show();
+                    } else {
+                        mActivity.runOnGLThread(new Runnable() {
+                            @Override
+                            public void run() {
+                                Cocos2dxJavascriptJavaBridge.evalString("PUBLIC.AliPayCallback('" + resultInfo + "','" + resultStatus + "')");
+                            }
+                        });
+                    }
+
+
+                    break;
+            }
+            return false;
+        }
+    });
+
 }

+ 54 - 0
src/org/cocos2dx/javascript/util/DeviceUuidFactory.java

@@ -0,0 +1,54 @@
+package org.cocos2dx.javascript.util;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.provider.Settings;
+import android.telephony.TelephonyManager;
+
+import java.io.UnsupportedEncodingException;
+import java.util.UUID;
+
+public class DeviceUuidFactory {
+    public static final String UUID_SPKEY = "uuid";
+    protected static UUID uuid;
+
+    public DeviceUuidFactory(Context context) {
+        if (uuid == null) {
+            synchronized (DeviceUuidFactory.class) {
+                if (uuid == null) {
+                    try {
+                        final String androidId = Settings.Secure.getString(
+                                context.getContentResolver(), Settings.Secure.ANDROID_ID);
+                        if (!"9774d56d682e549c".equals(androidId)) {
+                            uuid = UUID.nameUUIDFromBytes(androidId.getBytes("utf8"));
+                        } else {
+                            @SuppressLint("MissingPermission") final String deviceId = ((TelephonyManager) context
+                                    .getSystemService(Context.TELEPHONY_SERVICE))
+                                    .getDeviceId();
+                            uuid = deviceId != null ? UUID.nameUUIDFromBytes(deviceId
+                                    .getBytes("utf8")) : UUID.randomUUID();
+                            try {
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                            }
+                        }
+                    } catch (UnsupportedEncodingException e) {
+                        throw new RuntimeException(e);
+                    }
+                }
+                SPutil.setPrefString(context, UUID_SPKEY, uuid.toString());
+            }
+        }
+    }
+
+
+    /**
+     * @return UUID
+     */
+    public static UUID getUuid() {
+        if (uuid == null || uuid.equals("") || uuid.equals("null")) {
+            return null;
+        }
+        return uuid;
+    }
+}

+ 115 - 0
src/org/cocos2dx/javascript/util/SPutil.java

@@ -0,0 +1,115 @@
+package org.cocos2dx.javascript.util;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
+
+import java.util.List;
+
+/**
+ * 本地字符串缓存工具类
+ *
+ * @ClassName: SPutil
+ * @Description: TODO
+ */
+public class SPutil {
+
+    private static final String spName = "efunbox_mobile";
+
+    private static int model = Context.MODE_MULTI_PROCESS;
+
+    public static String getPrefString(Context context, String key, final String defaultValue) {
+        SharedPreferences sp = context.getSharedPreferences(spName, model);
+        return sp.getString(key, defaultValue);
+    }
+
+    public static void setPrefString(Context context, final String key, final String value) {
+        SharedPreferences sp = context.getSharedPreferences(spName, model);
+        sp.edit().putString(key, value).commit();
+    }
+
+    public static boolean getPrefBoolean(Context context, final String key, final boolean defaultValue) {
+
+        SharedPreferences sp = context.getSharedPreferences(spName, model);
+        return sp.getBoolean(key, defaultValue);
+    }
+
+    public static boolean hasKey(Context context, final String key) {
+        SharedPreferences sp = context.getSharedPreferences(spName, model);
+        return sp.contains(key);
+    }
+
+    public static void setPrefBoolean(Context context, final String key, final boolean value) {
+        SharedPreferences sp = context.getSharedPreferences(spName, model);
+        sp.edit().putBoolean(key, value).commit();
+    }
+
+    public static void setPrefInt(Context context, final String key, final int value) {
+        SharedPreferences sp = context.getSharedPreferences(spName, model);
+        sp.edit().putInt(key, value).commit();
+    }
+
+    public static int getPrefInt(Context context, final String key, final int defaultValue) {
+
+        SharedPreferences sp = context.getSharedPreferences(spName, model);
+        return sp.getInt(key, defaultValue);
+    }
+
+    public static void setPrefFloat(Context context, final String key, final float value) {
+        SharedPreferences sp = context.getSharedPreferences(spName, model);
+        sp.edit().putFloat(key, value).commit();
+    }
+
+    public static float getPrefFloat(Context context, final String key, final float defaultValue) {
+        SharedPreferences sp = context.getSharedPreferences(spName, model);
+        return sp.getFloat(key, defaultValue);
+    }
+
+    public static void setPrefLong(Context context, final String key, final long value) {
+        SharedPreferences sp = context.getSharedPreferences(spName, model);
+        sp.edit().putLong(key, value).commit();
+    }
+
+    public static long getPrefLong(Context context, final String key, final long defaultValue) {
+        SharedPreferences sp = context.getSharedPreferences(spName, model);
+        return sp.getLong(key, defaultValue);
+    }
+
+    public static void loadRecourdsArray(Context mContext, List<String> recourds, String name) {
+        SharedPreferences sp = mContext.getSharedPreferences(name, model);
+        recourds.clear();
+        int size = sp.getInt("recourds_size", 0);
+
+        for (int i = 0; i < size; i++) {
+            recourds.add(sp.getString("recourds_" + i, null));
+        }
+    }
+
+    public static boolean saveRecourdsArray(Context context, List<String> recourds, String name) {
+        SharedPreferences sp = context.getSharedPreferences(name, model);
+        Editor mEdit1 = sp.edit();
+        mEdit1.putInt("recourds_size", recourds.size()); /* sKey is an array */
+
+        for (int i = 0; i < recourds.size(); i++) {
+            mEdit1.remove("recourds_" + i);
+            mEdit1.putString("recourds_" + i, recourds.get(i));
+        }
+
+        return mEdit1.commit();
+    }
+
+    public static void clearRecourds(Context context, String name) {
+        SharedPreferences sp = context.getSharedPreferences(name, model);
+        Editor mEdit1 = sp.edit();
+        mEdit1.clear();
+        mEdit1.commit();
+    }
+
+    public static void removeByKey(Context context, String name, String key) {
+        SharedPreferences sp = context.getSharedPreferences(name, model);
+        Editor mEdit1 = sp.edit();
+        mEdit1.remove(key);
+        mEdit1.commit();
+    }
+
+}