Explorar el Código

v1.0.0开发:
1)修改混淆配置
2)core模块调整布局中string类引用

#Suyghur hace 2 años
padre
commit
e4540a1d4b
Se han modificado 83 ficheros con 619 adiciones y 1580 borrados
  1. 1 1
      channel_registry/channel_huawei2/build.gradle
  2. 1 1
      channel_registry/channel_huawei2/publish.gradle
  3. BIN
      channel_registry/channel_huawei2/src/main/res/drawable-xhdpi/yyxx_huawei.png
  4. 1 1
      channel_registry/channel_oppo/publish.gradle
  5. 2 2
      channel_registry/channel_oppo/src/main/AndroidManifest.xml
  6. 5 0
      channel_registry/channel_oppo/src/main/res/values/strings.xml
  7. 8 12
      demo/build.gradle
  8. BIN
      demo/libs/channel_huawei2-release.aar
  9. BIN
      demo/libs/library_comm-release.aar
  10. BIN
      demo/libs/library_impl-release.aar
  11. 0 75
      demo/src/main/assets/agconnect-services.json
  12. 8 3
      demo/src/main/assets/yyxx_game/yyxx_comm.properties
  13. 0 1
      demo/src/main/kotlin/com/eyuancomm/demo/DemoActivity.kt
  14. 0 2
      demo/src/main/kotlin/com/eyuancomm/demo/WelcomeActivity.kt
  15. 7 1
      keystore.properties
  16. 3 2
      library_comm/build.gradle
  17. 8 5
      library_comm/proguard-rules.pro
  18. 1 1
      library_comm/publish.gradle
  19. 1 1
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/Version.kt
  20. 1 1
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/ext/CountDownTimerExt.kt
  21. 1 1
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/ext/StringFilterExt.kt
  22. 2 63
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/network/VolleyRequest.kt
  23. 7 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/trace/channel/AdjustEventImpl.kt
  24. 18 3
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/utils/ParamsUtils.kt
  25. 4 2
      library_impl/build.gradle
  26. 1 1
      library_impl/publish.gradle
  27. 27 34
      library_impl/src/main/java/cn/yyxx/eyuancomm/impl/channel/eyuangame/ChannelSdkEYuanGame.kt
  28. 8 7
      library_impl/src/main/java/cn/yyxx/eyuancomm/impl/channel/huawei/ChannelSdkHuawei.kt
  29. 17 3
      library_impl/src/main/java/cn/yyxx/eyuancomm/impl/channel/huawei/floatview/FloatBallMenu.kt
  30. 2 1
      module_eyuan/library_eyuan/build.gradle
  31. 4 4
      module_eyuan/library_eyuan/proguard-rules.pro
  32. 2 2
      module_eyuan/library_eyuan/publish.gradle
  33. 168 95
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/EYuanGameSdk.kt
  34. 0 30
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/GameSdkDrive.kt
  35. 0 282
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/GameSdkImpl.kt
  36. 43 36
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/InAppBilling.kt
  37. 6 2
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/SdkJsImpl.kt
  38. 14 4
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/center/BindAccountContainer.kt
  39. 17 19
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/center/BindEmailContainer.kt
  40. 22 14
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/center/BindPhoneContainer.kt
  41. 20 12
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/center/HybridFeatureContainer.kt
  42. 22 2
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/center/MemberCenterContainer.kt
  43. 9 3
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/center/ModifyPwdContainer.kt
  44. 25 25
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/floatball/FloatCenterService.kt
  45. 2 2
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/floatball/FloatCenterServiceManager.kt
  46. 9 4
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/login/LoginActivity.kt
  47. 0 1
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/login/UserSignInImpl.kt
  48. 10 7
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/login/fragment/LauncherFragment.kt
  49. 7 5
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/login/fragment/RegisterFragment.kt
  50. 6 5
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/share/ShareImpl.kt
  51. 0 14
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/internal/IOrder.kt
  52. 0 32
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/internal/ITrace.kt
  53. 0 101
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/trace/TraceEventManager.kt
  54. 0 264
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/trace/channel/TraceAdjustImpl.kt
  55. 0 168
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/trace/channel/TraceFacebookImpl.kt
  56. 0 140
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/trace/channel/TraceFirebaseImpl.kt
  57. 5 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/widget/dialog/AgreementDialog.kt
  58. 12 1
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/widget/dialog/AutoLoginDialog.kt
  59. 9 11
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/widget/dialog/ChooseLoginDialog.kt
  60. 14 3
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/widget/dialog/ForgetPwdDialog.kt
  61. 3 3
      module_eyuan/library_eyuan/src/main/res/layout/yyxx_account_list_item.xml
  62. 1 1
      module_eyuan/library_eyuan/src/main/res/layout/yyxx_agreement_dialog.xml
  63. 0 2
      module_eyuan/library_eyuan/src/main/res/layout/yyxx_area_list_item.xml
  64. 3 3
      module_eyuan/library_eyuan/src/main/res/layout/yyxx_auto_login_dialog.xml
  65. 4 3
      module_eyuan/library_eyuan/src/main/res/layout/yyxx_forget_pwd_dialog.xml
  66. 1 1
      module_eyuan/library_eyuan/src/main/res/layout/yyxx_forget_pwd_email_container.xml
  67. 2 2
      module_eyuan/library_eyuan/src/main/res/layout/yyxx_forget_pwd_phone_container.xml
  68. 2 2
      module_eyuan/library_eyuan/src/main/res/layout/yyxx_login.xml
  69. 3 3
      module_eyuan/library_eyuan/src/main/res/layout/yyxx_login_launcher.xml
  70. 2 2
      module_eyuan/library_eyuan/src/main/res/layout/yyxx_login_register.xml
  71. 4 3
      module_eyuan/library_eyuan/src/main/res/layout/yyxx_member_bind_account.xml
  72. 5 4
      module_eyuan/library_eyuan/src/main/res/layout/yyxx_member_bind_email.xml
  73. 7 6
      module_eyuan/library_eyuan/src/main/res/layout/yyxx_member_bind_phone.xml
  74. 7 6
      module_eyuan/library_eyuan/src/main/res/layout/yyxx_member_center.xml
  75. 3 2
      module_eyuan/library_eyuan/src/main/res/layout/yyxx_member_modify_pwd.xml
  76. 5 0
      module_eyuan/library_eyuan/src/main/res/values/yyxx_strings.xml
  77. 0 13
      module_eyuan/library_hk_language/proguard-rules.pro
  78. 2 2
      module_eyuan/library_hk_language/publish.gradle
  79. 0 3
      module_eyuan/library_hk_language/src/main/res/values/yyxx_strings.xml
  80. 2 2
      module_eyuan/library_vn_language/publish.gradle
  81. 0 2
      module_eyuan/library_vn_language/src/main/res/values/yyxx_strings.xml
  82. 3 3
      settings.gradle
  83. BIN
      zkeystore/tscq_yyxx.keystore

+ 1 - 1
channel_registry/channel_huawei2/build.gradle

@@ -53,7 +53,7 @@ dependencies {
     api "com.huawei.agconnect:agconnect-auth-facebook:1.6.4.300"
     api "com.huawei.agconnect:agconnect-auth-google:1.6.4.300"
     api 'com.huawei.hms:hwid:6.4.0.300'
-    api 'com.facebook.android:facebook-login:12.3.0'
+    api 'com.facebook.android:facebook-login:13.0.0'
     api 'com.google.android.gms:play-services-auth:20.1.0'
 }
 

+ 1 - 1
channel_registry/channel_huawei2/publish.gradle

@@ -4,7 +4,7 @@ apply plugin: 'signing'
 ext {
     PUBLISH_GROUP_ID = 'io.github.yyxxgame.sdk'
     PUBLISH_ARTIFACT_ID = 'eyuancomm-channel-lib-huawei'
-    PUBLISH_VERSION = '1.0.0-rc3'
+    PUBLISH_VERSION = '1.0.0-rc4'
 }
 
 Properties properties = new Properties()

BIN
channel_registry/channel_huawei2/src/main/res/drawable-xhdpi/yyxx_huawei.png


+ 1 - 1
channel_registry/channel_oppo/publish.gradle

@@ -4,7 +4,7 @@ apply plugin: 'signing'
 ext {
     PUBLISH_GROUP_ID = 'io.github.yyxxgame.sdk'
     PUBLISH_ARTIFACT_ID = 'eyuancomm-channel-lib-oppo'
-    PUBLISH_VERSION = '1.0.0-rc3'
+    PUBLISH_VERSION = '1.0.0-rc4'
 }
 
 Properties properties = new Properties()

+ 2 - 2
channel_registry/channel_oppo/src/main/AndroidManifest.xml

@@ -41,10 +41,10 @@
         <!--appKey,游戏上线时请务必替换成游戏自身的appkey-->
         <meta-data
             android:name="app_key"
-            android:value="61960f8e6c2f45428284f16ac17e5f16" />
+            android:value="@string/oppo_app_key" />
         <meta-data
             android:name="app_secret"
-            android:value="1e930adae0cf433a9a0576563e5b8cce" />
+            android:value="@string/oppo_app_secret" />
 
         <activity
             android:name="com.nearme.game.sdk.component.proxy.ProxyActivity"

+ 5 - 0
channel_registry/channel_oppo/src/main/res/values/strings.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="oppo_app_key"></string>
+    <string name="oppo_app_secret"></string>
+</resources>

+ 8 - 12
demo/build.gradle

@@ -13,8 +13,6 @@ android {
 
     defaultConfig {
         applicationId 'com.shzd.eyuangame'
-//        applicationId 'com.xgyy.jpcq.nearme.gamecenter'
-//        applicationId 'com.xgyy.jpcq.huawei'
         minSdk rootProject.ext.android.minSdk
         targetSdk rootProject.ext.android.targetSdk
         versionCode 1
@@ -70,19 +68,17 @@ android {
 dependencies {
     implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
     implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
-//    implementation 'androidx.appcompat:appcompat:1.4.1'
+    implementation 'androidx.appcompat:appcompat:1.4.1'
+
+//    implementation 'io.github.yyxxgame.sdk:eyuancomm-sdk-ktx-comm:1.0.0-rc6'
+//    implementation 'io.github.yyxxgame.sdk:eyuancomm-sdk-ktx-impl:1.0.0-rc4'
+//    implementation 'io.github.yyxxgame.sdk:eyuancomm-sdk-ktx-core:1.0.0-rc5'
+//    implementation 'io.github.yyxxgame.sdk:eyuancomm-lang-vn:1.0.0-rc4'
 
-//    implementation 'io.github.yyxxgame.sdk:eyuancomm-sdk-ktx-comm:1.0.0-rc3'
-//    implementation 'io.github.yyxxgame.sdk:eyuancomm-sdk-ktx-impl:1.0.0-rc3'
-//    implementation 'io.github.yyxxgame.sdk:eyuancomm-channel-lib-huawei:1.0.0-rc3'
 
     implementation project(':library_comm')
     implementation project(':library_impl')
-    implementation project(':module_eyuan:library_eyuan')
-    implementation project(':module_eyuan:library_hk_language')
-
-//    compileOnly files('../libs/eyuancommsdk-comm-1.0.0.jar')
-//    implementation project(':channel_registry:channel_oppo')
-//    implementation project(':channel_registry:channel_huawei2')
 
+    implementation project(':module_eyuan:library_eyuan')
+    implementation project(':module_eyuan:library_vn_language')
 }

BIN
demo/libs/channel_huawei2-release.aar


BIN
demo/libs/library_comm-release.aar


BIN
demo/libs/library_impl-release.aar


+ 0 - 75
demo/src/main/assets/agconnect-services.json

@@ -1,75 +0,0 @@
-{
-  "agcgw": {
-    "backurl": "connect-dra.hispace.hicloud.com",
-    "url": "connect-dra.dbankcloud.cn",
-    "websocketbackurl": "connect-ws-dra.hispace.dbankcloud.com",
-    "websocketurl": "connect-ws-dra.hispace.dbankcloud.cn"
-  },
-  "agcgw_all": {
-    "CN": "connect-drcn.dbankcloud.cn",
-    "CN_back": "connect-drcn.hispace.hicloud.com",
-    "DE": "connect-dre.dbankcloud.cn",
-    "DE_back": "connect-dre.hispace.hicloud.com",
-    "RU": "connect-drru.dbankcloud.cn",
-    "RU_back": "connect-drru.hispace.hicloud.com",
-    "SG": "connect-dra.dbankcloud.cn",
-    "SG_back": "connect-dra.hispace.hicloud.com"
-  },
-  "client": {
-    "cp_id": "2640852000031689367",
-    "product_id": "737518067793991082",
-    "client_id": "781642244007414976",
-    "client_secret": "4F6D961703766A0590BCDC06B76B55BCA30F2AE5B09102CFBFB6ABEF7661821D",
-    "project_id": "737518067793991082",
-    "app_id": "105116483",
-    "api_key": "CwEAAAAAl0Ub8lJcC4b2nuGaT+j1NznFNrKGrBF5jKY3mpV8EXPIUkKrgSF5aqXcn6VhUuta+LncBgT7fwvI7mwsP/ZkPmcvoBw=",
-    "package_name": "com.xgyy.jpcq.huawei"
-  },
-  "oauth_client": {
-    "client_id": "105116483",
-    "client_type": 1
-  },
-  "app_info": {
-    "app_id": "105116483",
-    "package_name": "com.xgyy.jpcq.huawei"
-  },
-  "service": {
-    "analytics": {
-      "collector_url": "datacollector-dra.dt.hicloud.com,datacollector-dra.dt.dbankcloud.cn",
-      "collector_url_ru": "datacollector-drru.dt.hicloud.com,datacollector-drru.dt.dbankcloud.cn",
-      "collector_url_sg": "datacollector-dra.dt.hicloud.com,datacollector-dra.dt.dbankcloud.cn",
-      "collector_url_de": "datacollector-dre.dt.hicloud.com,datacollector-dre.dt.dbankcloud.cn",
-      "collector_url_cn": "datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
-      "resource_id": "p1",
-      "channel_id": ""
-    },
-    "search": {
-      "url": "https://search-dra.cloud.huawei.com"
-    },
-    "cloudstorage": {
-      "storage_url": "https://ops-dra.agcstorage.link",
-      "default_storage": ""
-    },
-    "ml": {
-      "mlservice_url": "ml-api-dra.ai.dbankcloud.com,ml-api-dra.ai.dbankcloud.cn"
-    }
-  },
-  "region": "SG",
-  "configuration_version": "3.0",
-  "appInfos": [
-    {
-      "package_name": "com.xgyy.jpcq.huawei",
-      "client": {
-        "app_id": "105116483"
-      },
-      "app_info": {
-        "package_name": "com.xgyy.jpcq.huawei",
-        "app_id": "105116483"
-      },
-      "oauth_client": {
-        "client_type": 1,
-        "client_id": "105116483"
-      }
-    }
-  ]
-}

+ 8 - 3
demo/src/main/assets/yyxx_game/yyxx_comm.properties

@@ -3,10 +3,15 @@ YYXX_GCP_CODE=Y010401
 YYXX_GAME_CODE=100001
 # 渠道Id
 YYXX_CHANNEL_ID=4
-# 事件打点应用ID
+# Adjust配置
 YYXX_ADJUST_TRACE=true
 YYXX_ADJUST_APP_ID=ymyq28xetdkw
-YYXX_FACEBOOK_TRACE=true
-YYXX_FIREBASE_TRACE=true
+YYXX_ADJUST_CHANNEL_TOKEN=6snwjqf
+# Facebook Analytics配置
+YYXX_FACEBOOK_TRACE=false
+# Firebase Analytics配置
+YYXX_FIREBASE_TRACE=false
 # debug模式(cp出正式包请关闭)
 YYXX_OWN_DEBUG=true
+# sdk地区
+YYXX_LANG_ENV=2

+ 0 - 1
demo/src/main/kotlin/com/eyuancomm/demo/DemoActivity.kt

@@ -230,7 +230,6 @@ class DemoActivity : Activity(), View.OnClickListener {
         //金额,单位分,币种美金
         gameChargeInfo.amount = 100
         //商品ID,计费点
-//        gameChargeInfo.productId = "com.shzd.1usd"
         gameChargeInfo.productId = "p.1yuan"
         //商品名称
         gameChargeInfo.productName = "60元寶"

+ 0 - 2
demo/src/main/kotlin/com/eyuancomm/demo/WelcomeActivity.kt

@@ -10,7 +10,6 @@ import android.os.Message
 import android.view.animation.AlphaAnimation
 import android.view.animation.Animation
 import android.widget.LinearLayout
-import cn.yyxx.eyuancomm.comm.utils.Logger
 import cn.yyxx.support.ResUtils
 
 /**
@@ -56,7 +55,6 @@ class WelcomeActivity : Activity() {
     }
 
     private fun goGameActivity() {
-        Logger.i("goGameActivity -> action = ${this.packageName}")
         startActivity(Intent(this.packageName))
         finish()
     }

+ 7 - 1
keystore.properties

@@ -2,7 +2,13 @@ storePassword=shzd1y28_yyxx2021
 keyPassword=shzd1y28_yyxx2021
 keyAlias=alias.shzd_yyxx2021
 storeFile=../zkeystore/shzd_yyxx.keystore
+
 #storePassword=qpcqc3uz_yyxx2022
 #keyPassword=qpcqc3uz_yyxx2022
 #keyAlias=alias.jpcq_yyxx2022
-#storeFile=../zkeystore/jpcq_yyxx.keystore
+#storeFile=../zkeystore/jpcq_yyxx.keystore
+
+#storePassword=tscqypb8_yyxx2022
+#keyPassword=tscqypb8_yyxx2022
+#keyAlias=alias.tscq_yyxx2022
+#storeFile=../zkeystore/tscq_yyxx.keystore

+ 3 - 2
library_comm/build.gradle

@@ -62,14 +62,15 @@ dependencies {
     implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
     implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
     implementation "androidx.core:core-ktx:1.7.0"
+    implementation 'com.android.installreferrer:installreferrer:2.2'
     // 日志采集框架
     api 'io.github.suyghur.dolin:zap:1.0.0'
     //mmkv
     api 'com.tencent:mmkv-static:1.2.10'
 
     implementation 'com.adjust.sdk:adjust-android:4.28.2'
-    implementation 'com.google.firebase:firebase-analytics-ktx:20.1.1'
-    implementation 'com.facebook.android:facebook-core:13.1.0'
+    compileOnly 'com.google.firebase:firebase-analytics-ktx:20.1.2'
+    compileOnly 'com.facebook.android:facebook-core:13.1.0'
 
     api files("../libs/yyxx_support_1.0.2.jar")
     api files("../libs/oaid_sdk_1.0.25.jar")

+ 8 - 5
library_comm/proguard-rules.pro

@@ -146,16 +146,19 @@
 -keep class cn.yyxx.support.**{*;}
 
 -keeppackagenames cn.yyxx.eyuancomm.**
-#-keep class cn.yyxx.eyuancomm.comm.entity.ChannelId{public <fields>; public <methods>;}
-#-keep class cn.yyxx.eyuancomm.comm.entity.Function{public <fields>; public <methods>;}
 -keep class cn.yyxx.eyuancomm.comm.entity.SdkChargeInfo{public <fields>; public <methods>;}
+-keep class cn.yyxx.eyuancomm.comm.entity.SdkEvent{public <fields>; public <methods>;}
+-keep class cn.yyxx.eyuancomm.comm.entity.ResultInfo{public <fields>; public <methods>;}
 -keep class cn.yyxx.eyuancomm.comm.entity.SdkLoginInfo{public <fields>; public <methods>;}
+-keep class cn.yyxx.eyuancomm.comm.entity.SdkLoginInfo$Companion{public <fields>; public <methods>;}
 -keep class cn.yyxx.eyuancomm.comm.entity.SdkRoleInfo{public <fields>; public <methods>;}
--keep class cn.yyxx.eyuancomm.comm.base.ext.**{public <fields>; public <methods>;}
+-keep class cn.yyxx.eyuancomm.comm.network.Host{public <fields>; public<methods>;}
+-keep class cn.yyxx.eyuancomm.comm.network.VolleyRequest{public <fields>; public<methods>;}
 -keep class cn.yyxx.eyuancomm.comm.internal.**{public <fields>; public <methods>;}
 -keep class cn.yyxx.eyuancomm.comm.impl.CommSdkDrive{public <fields>; public <methods>;}
--keep class cn.yyxx.eyuancomm.comm.base.utils.**{public <fields>; public <methods>;}
+-keep class cn.yyxx.eyuancomm.comm.ext.**{public <fields>; public <methods>;}
+-keep class cn.yyxx.eyuancomm.comm.utils.**{public <fields>; public <methods>;}
 -keep class cn.yyxx.eyuancomm.comm.widget.**{public <fields>; public <methods>;}
 -keep class cn.yyxx.eyuancomm.comm.EYuanCommSdk{public <fields>; public <methods>;}
 -keep class cn.yyxx.eyuancomm.comm.EYuanCommSdkApplication{public <fields>; public <methods>;}
--keep class cn.yyxx.eyuancomm.core.Version{public <fields>; public <methods>;}
+-keep class cn.yyxx.eyuancomm.Version{public <fields>; public <methods>;}

+ 1 - 1
library_comm/publish.gradle

@@ -4,7 +4,7 @@ apply plugin: 'signing'
 ext {
     PUBLISH_GROUP_ID = 'io.github.yyxxgame.sdk'
     PUBLISH_ARTIFACT_ID = 'eyuancomm-sdk-ktx-comm'
-    PUBLISH_VERSION = '1.0.0-rc3'
+    PUBLISH_VERSION = '1.0.0-rc6'
 }
 
 Properties properties = new Properties()

+ 1 - 1
library_comm/src/main/kotlin/cn/yyxx/eyuancomm/Version.kt

@@ -5,7 +5,7 @@ package cn.yyxx.eyuancomm
  * Created on 2021/06/09
  */
 object Version {
-    const val VERSION_NAME = "1.0.0-rc2"
+    const val VERSION_NAME = "1.0.0-rc6"
     const val VERSION_CODE = 100
     const val SERVER_VERSION = "1.0.0"
 }

+ 1 - 1
library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/ext/CountDownTimerExt.kt

@@ -1,4 +1,4 @@
-package cn.yyxx.eyuancomm.core.ext
+package cn.yyxx.eyuancomm.comm.ext
 
 import kotlinx.coroutines.CoroutineScope
 import kotlinx.coroutines.Dispatchers

+ 1 - 1
library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/ext/StringFilterExt.kt

@@ -1,4 +1,4 @@
-package cn.yyxx.eyuancomm.core.ext
+package cn.yyxx.eyuancomm.comm.ext
 
 import android.text.TextUtils
 

+ 2 - 63
library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/network/VolleyRequest.kt

@@ -37,67 +37,6 @@ object VolleyRequest {
 
     private const val MAX_TIMEOUT = 10 * 1000
 
-    fun post2(context: Context, jsonObject: JSONObject): Flow<ResultInfo> {
-        val time = System.currentTimeMillis().toString()
-        val randomKey = time + StrUtils.getRandomString(16)
-        val rawKey = Md5Utils.encodeByMD5(randomKey)
-        val aesKey = Md5Utils.encodeByMD5(rawKey + StrUtils.reverseString(rawKey))
-        val hexP = CommSdkDrive.instance.invokeJob(aesKey.substring(8, 24), jsonObject.toString())
-
-        val tmp = HexUtils.hexString2Bytes(hexP)
-        val p = Base64Utils.encode(tmp)
-
-        Logger.d("请求路由 : ${jsonObject["route_path"]}")
-        Logger.d("请求参数 : $jsonObject")
-        Logger.logHandler("请求路由 : ${jsonObject["route_path"]}\n")
-        Logger.logHandler("请求参数 : $jsonObject\n")
-        val obj = JSONObject()
-        obj.put("p", p)
-        obj.put("ts", rawKey)
-        Logger.d("$obj")
-        Logger.d("host: ${Host.HOST}")
-
-        return callbackFlow {
-            val request = object : JsonObjectRequest(Method.POST, Host.HOST, obj, Response.Listener {
-                val resultInfo = ResultInfo()
-                resultInfo.code = -1
-                resultInfo.msg = "接口请求异常"
-                it?.apply {
-                    resultInfo.code = it.getInt("code")
-                    resultInfo.msg = it.getString("msg")
-                    resultInfo.data = if (JsonUtils.hasJsonKey(it, "data")) {
-                        it.getJSONObject("data").parseResponse()
-                    } else {
-                        "{}"
-                    }
-                }
-                it.put("data", JSONObject(resultInfo.data))
-                Logger.d("返回信息 : $it")
-                Logger.logHandler("返回信息 : $it\n")
-//                callback(resultInfo)
-                trySend(resultInfo)
-            }, Response.ErrorListener {
-                it?.apply {
-                    Logger.e("postByVolley onErrorResponse : $it")
-                    trySend(getErrorResultInfo(context))
-//                    callback(getErrorResultInfo(context))
-                }
-            }) {
-                override fun getHeaders(): MutableMap<String, String> {
-                    val headers = HashMap<String, String>()
-                    headers["Accept"] = "application/json"
-                    headers["Content-Type"] = "application/json;charset=UTF-8"
-                    return headers
-                }
-            }
-            //设置超时时间
-            request.retryPolicy = DefaultRetryPolicy(MAX_TIMEOUT, 1, 1.0f)
-            VolleySingleton.getInstance(context.applicationContext).addToRequestQueue(context.applicationContext, request)
-            awaitClose()
-        }
-
-    }
-
     @Throws
     fun post(context: Context, jsonObject: JSONObject, callback: (ResultInfo) -> Unit) {
         val time = System.currentTimeMillis().toString()
@@ -109,15 +48,15 @@ object VolleyRequest {
         val tmp = HexUtils.hexString2Bytes(hexP)
         val p = Base64Utils.encode(tmp)
 
+        Logger.d("host: ${Host.HOST}")
         Logger.d("请求路由 : ${jsonObject["route_path"]}")
         Logger.d("请求参数 : $jsonObject")
         Logger.logHandler("请求路由 : ${jsonObject["route_path"]}\n")
         Logger.logHandler("请求参数 : $jsonObject\n")
+
         val obj = JSONObject()
         obj.put("p", p)
         obj.put("ts", rawKey)
-        Logger.d("$obj")
-        Logger.d("host: ${Host.HOST}")
 
         val request = object : JsonObjectRequest(Method.POST, Host.HOST, obj, Response.Listener {
             val resultInfo = ResultInfo()

+ 7 - 0
library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/trace/channel/AdjustEventImpl.kt

@@ -41,6 +41,7 @@ class AdjustEventImpl(private val onIdRead: (String) -> Unit) : ITrace {
         }
 
         val appId = ParamsUtils.getAdjustAppId(application)
+
         if (TextUtils.isEmpty(appId)) {
             Logger.e("adjust log 初始化失败,app id为空")
             isInitSuccess = false
@@ -58,6 +59,12 @@ class AdjustEventImpl(private val onIdRead: (String) -> Unit) : ITrace {
         config.setOnAttributionChangedListener {
             onIdRead(it.adid)
         }
+
+        val channelToken = ParamsUtils.getAdjustChannelToken(application)
+        if (!TextUtils.isEmpty(channelToken)) {
+            config.setDefaultTracker(channelToken)
+        }
+
         Adjust.onCreate(config)
         if (MMKVManager.instance.eventKV.decodeBool("adjust_activities")) {
             isInitSuccess = true

+ 18 - 3
library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/utils/ParamsUtils.kt

@@ -15,11 +15,12 @@ object ParamsUtils {
     private const val YYXX_GCP_CODE = "YYXX_GCP_CODE"
     private const val YYXX_GAME_CODE = "YYXX_GAME_CODE"
     private const val YYXX_CHANNEL_ID = "YYXX_CHANNEL_ID"
-    private const val YYXX_DO_MAIN_ENV = "YYXX_DO_MAIN_ENV"
     private const val YYXX_ADJSUT_APP_ID = "YYXX_ADJUST_APP_ID"
+    private const val YYXX_ADJUST_CHANNEL_TOKEN = "YYXX_ADJUST_CHANNEL_TOKEN"
     private const val YYXX_ADJUST_TRACE = "YYXX_ADJUST_TRACE"
     private const val YYXX_FIREBASE_TRACE = "YYXX_FIREBASE_TRACE"
     private const val YYXX_FACEBOOK_TRACE = "YYXX_FACEBOOK_TRACE"
+    private const val YYXX_LANG_ENV = "YYXX_LANG_ENV"
 
 
     @JvmStatic
@@ -74,6 +75,20 @@ object ParamsUtils {
         return ""
     }
 
+    @JvmStatic
+    fun getAdjustChannelToken(context: Context): String {
+        try {
+            val token = PropertiesUtils.getValue4Properties(context, CONFIG_FILE, "yyxx_game", YYXX_ADJUST_CHANNEL_TOKEN)
+            if (!TextUtils.isEmpty(token)) {
+                return token
+            }
+        } catch (e: Exception) {
+            e.printStackTrace()
+        }
+        return ""
+    }
+
+
     fun getAdjustTrace(context: Context): Boolean {
         try {
             val enable = PropertiesUtils.getValue4Properties(context, CONFIG_FILE, "yyxx_game", YYXX_ADJUST_TRACE)
@@ -111,9 +126,9 @@ object ParamsUtils {
     }
 
     @JvmStatic
-    fun getDoMainEnv(context: Context): Int {
+    fun getLangEnv(context: Context): Int {
         try {
-            val env = PropertiesUtils.getValue4Properties(context, CONFIG_FILE, "yyxx_game", YYXX_DO_MAIN_ENV)
+            val env = PropertiesUtils.getValue4Properties(context, CONFIG_FILE, "yyxx_game", YYXX_LANG_ENV)
             if (!TextUtils.isEmpty(env)) {
                 return env.toInt()
             }

+ 4 - 2
library_impl/build.gradle

@@ -46,5 +46,7 @@ dependencies {
     compileOnly project(':module_eyuan:library_eyuan')
     compileOnly project(':channel_registry:channel_oppo')
     compileOnly project(':channel_registry:channel_vivo')
-    compileOnly project(':channel_registry:channel_huawei')
-}
+    compileOnly project(':channel_registry:channel_huawei2')
+}
+
+apply from: 'publish.gradle'

+ 1 - 1
library_impl/publish.gradle

@@ -4,7 +4,7 @@ apply plugin: 'signing'
 ext {
     PUBLISH_GROUP_ID = 'io.github.yyxxgame.sdk'
     PUBLISH_ARTIFACT_ID = 'eyuancomm-sdk-ktx-impl'
-    PUBLISH_VERSION = '1.0.0-rc3'
+    PUBLISH_VERSION = '1.0.0-rc4'
 }
 
 Properties properties = new Properties()

+ 27 - 34
library_impl/src/main/java/cn/yyxx/eyuancomm/impl/channel/eyuangame/ChannelSdkEYuanGame.kt

@@ -17,9 +17,7 @@ import org.json.JSONObject
 internal class ChannelSdkEYuanGame : IFeature, ILifeCycle, IConfig, IRoleData, IFloatBall {
 
     override fun initialize(activity: Activity, isLandscape: Boolean, callback: ICallback) {
-        EYuanGameSdk.getInstance().initialize(activity, isLandscape) { code, result ->
-            callback.onResult(code, result)
-        }
+        EYuanGameSdk.getInstance().initialize(activity, isLandscape, callback)
     }
 
     override fun installConfig(activity: Activity, config: String) {
@@ -27,51 +25,48 @@ internal class ChannelSdkEYuanGame : IFeature, ILifeCycle, IConfig, IRoleData, I
     }
 
     override fun login(activity: Activity, callback: ICallback) {
-        EYuanGameSdk.getInstance().login(activity, true) { code, result ->
-            callback.onResult(code, result)
-        }
+        EYuanGameSdk.getInstance().login(activity, true, callback)
     }
 
     override fun logout(activity: Activity, callback: ICallback) {
-        EYuanGameSdk.getInstance().logout(activity) { code, result ->
-            callback.onResult(code, result)
-        }
+        EYuanGameSdk.getInstance().logout(activity, callback)
     }
 
     override fun charge(activity: Activity, chargeInfo: SdkChargeInfo, callback: ICallback) {
-        EYuanGameSdk.getInstance().charge(activity, chargeInfo) { code, result, consumeHandler ->
-            when (code) {
-                0 -> callback.onResult(0, "支付流程完成")
-                1, 2 -> {
-                    // 通知服务端发货
-                    val jsonObject = JSONObject(result)
-                    val orderNotifyData = JSONObject(jsonObject.getString("order_notify_data"))
-                    val purchaseToken = orderNotifyData.getString("purchaseToken")
-                    SdkRequest.instance.notifyOrder(activity, jsonObject) { resultInfo ->
-                        if (resultInfo.code == 1 || resultInfo.code == 2) {
-                            if (code == 1) {
-                                consumeHandler?.onConsume(activity, chargeInfo, purchaseToken, false)
+        EYuanGameSdk.getInstance().charge(activity, chargeInfo, object : ICallback {
+            override fun onResult(code: Int, result: String) {
+                when (code) {
+                    0 -> callback.onResult(0, "支付流程完成")
+                    1, 2 -> {
+                        // 通知服务端发货
+                        val jsonObject = JSONObject(result)
+                        val orderNotifyData = JSONObject(jsonObject.getString("order_notify_data"))
+                        val purchaseToken = orderNotifyData.getString("purchaseToken")
+                        SdkRequest.instance.notifyOrder(activity, jsonObject) { resultInfo ->
+                            if (resultInfo.code == 1 || resultInfo.code == 2) {
+                                if (code == 1) {
+                                    EYuanGameSdk.getInstance().consumeOrder(activity, chargeInfo, purchaseToken, false)
+                                } else {
+                                    EYuanGameSdk.getInstance().consumeOrder(activity, chargeInfo, purchaseToken, true)
+                                }
                             } else {
-                                consumeHandler?.onConsume(activity, chargeInfo, purchaseToken, true)
+                                EYuanGameSdk.getInstance().disconnectPlayService()
+                                callback.onResult(-1, "消耗订单异常")
                             }
-                        } else {
-                            consumeHandler?.onFinish()
-                            callback.onResult(-1, "消耗订单异常")
                         }
                     }
+                    else -> callback.onResult(-1, "支付失败")
                 }
-                else -> callback.onResult(-1, "支付失败")
-
             }
-        }
+
+        })
     }
 
+
     override fun hasExitView(activity: Activity): Boolean = true
 
     override fun openExitView(activity: Activity, callback: ICallback) {
-        EYuanGameSdk.getInstance().openExitView(activity) { code, result ->
-            callback.onResult(code, result)
-        }
+        EYuanGameSdk.getInstance().openExitView(activity, callback)
     }
 
     override fun onDestroy(activity: Activity) {
@@ -130,8 +125,6 @@ internal class ChannelSdkEYuanGame : IFeature, ILifeCycle, IConfig, IRoleData, I
     }
 
     override fun onFloatBallLogout(callback: ICallback) {
-        EYuanGameSdk.getInstance().setOnFloatBallLogoutCallback { code, result ->
-            callback.onResult(code, result)
-        }
+        EYuanGameSdk.getInstance().setOnFloatBallLogoutCallback(callback)
     }
 }

+ 8 - 7
library_impl/src/main/java/cn/yyxx/eyuancomm/impl/channel/huawei/ChannelSdkHuawei.kt

@@ -53,7 +53,7 @@ import org.json.JSONObject
  * @author #Suyghur.
  * Created on 2022/01/26
  */
-class ChannelSdkHuawei : IFeature, IApplication, ILifeCycle, IFloatBall {
+internal class ChannelSdkHuawei : IFeature, IApplication, ILifeCycle, IFloatBall {
 
     private lateinit var activity: Activity
     private lateinit var loginCallback: ICallback
@@ -196,7 +196,7 @@ class ChannelSdkHuawei : IFeature, IApplication, ILifeCycle, IFloatBall {
                 loginCallback.onResult(0, jsonObject.toString())
             }
             FloatCenterServiceManager.instance.init(activity, isLandscape, floatBallCallback)
-            callback.onResult(0, "SDK初始化成功")
+            callback.onResult(0, "华为SDK初始化成功")
         }.addOnFailureListener { e ->
             Logger.d("华为SDK初始化失败, ${e.message}")
             if (e is ApiException) {
@@ -219,6 +219,7 @@ class ChannelSdkHuawei : IFeature, IApplication, ILifeCycle, IFloatBall {
                     }
                 }
             }
+            callback.onResult(-1, "华为SDK初始化失败")
         }
     }
 
@@ -280,7 +281,7 @@ class ChannelSdkHuawei : IFeature, IApplication, ILifeCycle, IFloatBall {
                 } else {
                     dismissLoadingDialog()
                     Logger.d("支付发生异常")
-                    callback.onResult(-1, "通知发货发生异常")
+                    callback.onResult(-1, "支付发生异常")
                 }
             }
         })
@@ -379,16 +380,16 @@ class ChannelSdkHuawei : IFeature, IApplication, ILifeCycle, IFloatBall {
 
     private fun doLink(activity: Activity, channel: Int) {
         AGConnectAuth.getInstance().currentUser.link(activity, channel).addOnSuccessListener {
-            ToastUtils.toastInfo(activity, "賬號關聯成功")
-            Logger.d("賬號關聯成功")
+            ToastUtils.toastInfo(activity, "Account linked successfully")
+            Logger.d("账号关联成功")
             linkDialog?.apply {
                 dismiss()
                 linkDialog = null
             }
         }.addOnFailureListener {
             // onFail
-            ToastUtils.toastInfo(activity, "賬號關聯失敗,${it.localizedMessage}")
-            Logger.d("賬號關聯失敗, ${it.localizedMessage}")
+            ToastUtils.toastInfo(activity, "Account linking failed,${it.localizedMessage}")
+            Logger.d("账号关联失败, ${it.localizedMessage}")
         }
     }
 

+ 17 - 3
library_impl/src/main/java/cn/yyxx/eyuancomm/impl/channel/huawei/floatview/FloatBallMenu.kt

@@ -6,6 +6,7 @@ import android.view.LayoutInflater
 import android.view.View
 import android.view.ViewGroup
 import android.widget.*
+import cn.yyxx.eyuancomm.comm.utils.ParamsUtils
 import cn.yyxx.support.DensityUtils
 import cn.yyxx.support.ResUtils
 
@@ -91,18 +92,31 @@ class FloatBallMenu(val context: Context, private val callback: FloatingBallMenu
             val view = View.inflate(context, ResUtils.getResId(context, "yyxx_float_ball_item", "layout"), null)
             val ivIcon = view.findViewById<ImageView>(ResUtils.getResId(context, "yyxx_iv_icon", "id"))
             val tvDesc = view.findViewById<TextView>(ResUtils.getResId(context, "yyxx_tv_desc", "id"))
+            val env = ParamsUtils.getLangEnv(context)
             when (item.type) {
                 FloatFeature.FEATURE_SWITCH -> {
                     ivIcon.setBackgroundResource(ResUtils.getResId(context, "yyxx_float_switch_img", "drawable"))
-                    tvDesc.text = "切換賬號"
+                    if (env == 2) {
+                        tvDesc.text = "Đổi"
+                    } else {
+                        tvDesc.text = "切換賬號"
+                    }
                 }
                 FloatFeature.FEATURE_LINK -> {
                     ivIcon.setBackgroundResource(ResUtils.getResId(context, "yyxx_float_link_img", "drawable"))
-                    tvDesc.text = "賬號關聯"
+                    if (env == 2) {
+                        tvDesc.text = "Liên Kết"
+                    } else {
+                        tvDesc.text = "賬號關聯"
+                    }
                 }
                 FloatFeature.FEATURE_CLOSE -> {
                     ivIcon.setBackgroundResource(ResUtils.getResId(context, "yyxx_float_close_img", "drawable"))
-                    tvDesc.text = "隱藏"
+                    if (env == 2) {
+                        tvDesc.text = "Ẩn"
+                    } else {
+                        tvDesc.text = "隱藏"
+                    }
                 }
 
             }

+ 2 - 1
module_eyuan/library_eyuan/build.gradle

@@ -71,10 +71,11 @@ dependencies {
     implementation 'com.google.android.gms:play-services-auth:20.1.0'
     //4.0.0的billing库消耗商品会回调两次,后续在排查,先用3.0.3
     implementation 'com.android.billingclient:billing-ktx:3.0.3'
-    implementation 'com.google.firebase:firebase-analytics-ktx:20.1.1'
+    implementation 'com.google.firebase:firebase-analytics-ktx:20.1.2'
     implementation 'com.google.firebase:firebase-crashlytics-ktx:18.2.9'
 
     //facebook
+    implementation 'com.facebook.android:facebook-core:13.1.0'
     implementation 'com.facebook.android:facebook-login:13.0.0'
     implementation 'com.facebook.android:facebook-share:13.0.0'
 

+ 4 - 4
module_eyuan/library_eyuan/proguard-rules.pro

@@ -133,8 +133,8 @@
     public static <fields>;
 }
 
--keeppackagenames cn.yyxx.eyuangame.**
+-keeppackagenames cn.yyxx.eyuancomm.core.**
 -keep class cn.yyxx.eyuancomm.core.EYuanGameSdk{public <fields>; public <methods>;}
--keep class cn.yyxx.eyuancomm.core.Version{public <fields>; public <methods>;}
--keep class cn.yyxx.eyuancomm.core.impl.GameSdkDrive{public <fields>; public <methods>;}
--keep class cn.yyxx.eyuancomm.core.impl.SdkJsImpl{*;}
+-keep class cn.yyxx.eyuancomm.core.EYuanGameSdk$Companion{public <fields>; public <methods>;}
+-keep class cn.yyxx.eyuancomm.core.impl.SdkJsImpl{*;}
+-keep class cn.yyxx.eyuancomm.core.impl.floatball.FloatCenterService{public<fields>;public<methods>;}

+ 2 - 2
module_eyuan/library_eyuan/publish.gradle

@@ -3,8 +3,8 @@ apply plugin: 'signing'
 
 ext {
     PUBLISH_GROUP_ID = 'io.github.yyxxgame.sdk'
-    PUBLISH_ARTIFACT_ID = 'eyuangame-sdk-ktx'
-    PUBLISH_VERSION = '1.0.3-fix1'
+    PUBLISH_ARTIFACT_ID = 'eyuancomm-sdk-ktx-core'
+    PUBLISH_VERSION = '1.0.0-rc5'
 }
 
 Properties properties = new Properties()

+ 168 - 95
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/EYuanGameSdk.kt

@@ -1,26 +1,44 @@
 package cn.yyxx.eyuancomm.core
 
 import android.app.Activity
+import android.app.Activity.RESULT_OK
 import android.content.Intent
+import android.text.TextUtils
 import cn.yyxx.eyuancomm.comm.entity.SdkChargeInfo
+import cn.yyxx.eyuancomm.comm.entity.SdkLoginInfo
 import cn.yyxx.eyuancomm.comm.entity.SdkRoleInfo
+import cn.yyxx.eyuancomm.comm.internal.ICallback
 import cn.yyxx.eyuancomm.comm.utils.Logger
-import cn.yyxx.eyuancomm.core.impl.GameSdkImpl
-import cn.yyxx.eyuancomm.core.internal.IOrder
+import cn.yyxx.eyuancomm.comm.utils.MMKVManager
+import cn.yyxx.eyuancomm.core.entity.bean.InitBean
+import cn.yyxx.eyuancomm.core.impl.InAppBilling
+import cn.yyxx.eyuancomm.core.impl.center.HybridFeatureContainer
+import cn.yyxx.eyuancomm.core.impl.floatball.FloatCenterServiceManager
+import cn.yyxx.eyuancomm.core.impl.login.LoginActivity
+import cn.yyxx.eyuancomm.core.impl.share.ShareImpl
+import cn.yyxx.eyuancomm.core.network.SdkRequest
+import cn.yyxx.eyuancomm.core.widget.dialog.TipsDialog
+import cn.yyxx.support.ResUtils
+import cn.yyxx.support.device.DeviceInfoUtils
+
 
 /**
  * @author #Suyghur.
- * Created on 2021/06/09
+ * Created on 2021/06/16
  */
-class EYuanGameSdk private constructor() {
+class EYuanGameSdk {
 
-    private val impl: GameSdkImpl by lazy {
-        GameSdkImpl()
-    }
+    private var isSubmitRoleData = false
+
+    private var exitDialog: TipsDialog? = null
 
     private var doSdkInit = false
 
     companion object {
+        var isLandscape = false
+        lateinit var initBean: InitBean
+        var floatBallLogoutCallback: ICallback? = null
+
         @JvmStatic
         fun getInstance(): EYuanGameSdk {
             return EYuanGameSdkHolder.INSTANCE
@@ -38,177 +56,232 @@ class EYuanGameSdk private constructor() {
         }
     }
 
-    /**
-     * SDK初始化
-     *
-     * @param activity    Activity上下文
-     * @param isLandscape 是否横屏
-     * @param callback    SDK初始化回调
-     */
-    fun initialize(activity: Activity, isLandscape: Boolean, callback: (Int, String) -> Unit) {
+    fun initialize(activity: Activity, isLandscape: Boolean, callback: ICallback) {
+        Logger.i("EYuanGameSdk initialize ...")
         //有些CP在资源再加时候回重复调用初始化,这里拦截一下
         if (doSdkInit) {
             Logger.e("EYuanGameSdk initialize 已经执行,拦截此次调用")
             return
         }
 
-        impl.initialize(activity, isLandscape) { code, result ->
-            doSdkInit = code == 0
-            callback(code, result)
-        }
+        Companion.isLandscape = isLandscape
+        doSdkInit = true
+        callback.onResult(0, "SDK初始化成功")
     }
 
     fun installConfig(activity: Activity, config: String) {
         if (checkSdkNonInit("installConfig", null)) {
             return
         }
-        impl.installConfig(activity, config)
+
+        initBean = InitBean.toBean(config)
+        cacheImageResource(activity)
+        FloatCenterServiceManager.instance.init(activity)
     }
 
-    fun setOnFloatBallLogoutCallback(callback: (Int, String) -> Unit) {
+    fun setOnFloatBallLogoutCallback(callback: ICallback) {
         if (checkSdkNonInit("setOnFloatBallLogoutCallback", null)) {
             return
         }
-        impl.setOnFloatBallLogoutCallback(callback)
+        floatBallLogoutCallback = callback
+    }
+
+    private fun cacheImageResource(activity: Activity) {
+        //全图标
+        SdkRequest.instance.downloadImageFile(activity, initBean.floatCfg.floatIconUrl)
+        //左边
+        SdkRequest.instance.downloadImageFile(activity, initBean.floatCfg.floatIconLeftUrl)
+        //右边
+        SdkRequest.instance.downloadImageFile(activity, initBean.floatCfg.floatIconRightUrl)
+        //会员中心
+        SdkRequest.instance.downloadImageFile(activity, initBean.floatCfg.floatIconUrl)
+        //礼包
+        SdkRequest.instance.downloadImageFile(activity, initBean.floatCfg.floatIconUrl)
+        //客服
+        SdkRequest.instance.downloadImageFile(activity, initBean.floatCfg.floatIconUrl)
+        //储值
+        SdkRequest.instance.downloadImageFile(activity, initBean.floatCfg.floatIconUrl)
+        //邀请
+        SdkRequest.instance.downloadImageFile(activity, initBean.floatCfg.floatIconUrl)
     }
 
-    /**
-     * SDK用户登录
-     *
-     * @param activity Activity上下文
-     * @param isAutoLogin 是否自动登录
-     * @param callback 登录回调对象
-     */
-    fun login(activity: Activity, isAutoLogin: Boolean, callback: (Int, String) -> Unit) {
+    fun login(activity: Activity, isAutoLogin: Boolean, callback: ICallback) {
+        Logger.i("EYuanGameSdk login ...")
+
         if (checkSdkNonInit("login", callback)) {
             return
         }
 
-        impl.login(activity, isAutoLogin, callback)
+        SdkLoginInfo.instance.reset()
+        LoginActivity.login(activity, isAutoLogin) { code, result ->
+            callback.onResult(code, result)
+        }
     }
 
-    /**
-     * SDK用户登出账号
-     *
-     * @param activity Activity上下文
-     * @param callback 登出回调对象
-     */
-    fun logout(activity: Activity, callback: (Int, String) -> Unit) {
+    fun logout(activity: Activity, callback: ICallback) {
+        Logger.i("EYuanGameSdk logout ...")
         if (checkSdkNonInit("logout", callback)) {
             return
         }
 
-        impl.logout(activity, callback)
+        SdkLoginInfo.instance.reset()
+        FloatCenterServiceManager.instance.detach()
+        callback.onResult(0, "用户登出成功")
     }
 
-    /**
-     * SDK用户支付
-     *
-     * @param activity   Activity上下文
-     * @param chargeInfo 支付信息实体对象
-     * @param callback   支付回调对象
-     */
-    fun charge(activity: Activity, chargeInfo: SdkChargeInfo, callback: (Int, String, IOrder?) -> Unit) {
-        if (!doSdkInit) {
-            Logger.e("invoke charge error ... EYuanGameSdk not initialized yet")
-            callback(-1, "EYuanGameSdk 还未进行初始化", null)
+    fun charge(activity: Activity, chargeInfo: SdkChargeInfo, callback: ICallback) {
+        Logger.i("EYuanGameSdk charge ...")
+
+        if (checkSdkNonInit("charge", callback)) {
             return
         }
-        impl.charge(activity, chargeInfo, callback)
+        if (TextUtils.isEmpty(SdkLoginInfo.instance.userId)) {
+            Logger.e("支付失败,用户未登录或登录失败")
+            callback.onResult(-1, "支付失败,用户未登录或登录失败")
+            return
+        }
+        if (!isSubmitRoleData) {
+            Logger.e("支付失败,角色未登录或登录失败")
+            callback.onResult(-1, "支付失败,角色未登录或登录失败")
+            return
+        }
+        if (!DeviceInfoUtils.isNetworkConnected(activity)) {
+            Logger.e("当前网络连接异常,请重试")
+            callback.onResult(-1, "当前网络连接异常,请重试")
+            return
+        }
+
+        if (chargeInfo.payment == 3) {
+            // h5支付
+            HybridFeatureContainer(activity, initBean.floatCfg.chargeCfg.url).show()
+        } else {
+            InAppBilling.instance.charge(activity, chargeInfo, callback)
+        }
+    }
+
+    fun consumeOrder(activity: Activity, chargeInfo: SdkChargeInfo, purchaseToken: String, cache: Boolean) {
+        InAppBilling.instance.consumeOrder(activity, chargeInfo, purchaseToken, cache)
+    }
+
+    fun disconnectPlayService() {
+        InAppBilling.instance.disconnectPlayService()
     }
 
-    /**
-     * SDK角色创建信息上报
-     *
-     * @param activity Activity上下文
-     * @param roleInfo 角色信息实体
-     */
     fun roleCreate(activity: Activity, roleInfo: SdkRoleInfo) {
+        Logger.i("EYuanGameSdk roleCreate ...")
         if (checkSdkNonInit("roleCreate", null)) {
             return
         }
-        impl.roleCreate(activity, roleInfo)
+        isSubmitRoleData = true
     }
 
-    /**
-     * SDK角色登录信息上报
-     *
-     * @param activity Activity上下文
-     * @param roleInfo 角色信息实体
-     */
     fun roleLauncher(activity: Activity, roleInfo: SdkRoleInfo) {
+        Logger.i("EYuanGameSdk roleLauncher ...")
         if (checkSdkNonInit("roleLauncher", null)) {
             return
         }
-
-        impl.roleLauncher(activity, roleInfo)
+        isSubmitRoleData = true
     }
 
-    /**
-     * SDK角色升级信息上报
-     *
-     * @param activity Activity上下文
-     * @param roleInfo 角色信息实体
-     */
     fun roleLevelUp(activity: Activity, roleInfo: SdkRoleInfo) {
+        Logger.i("EYuanGameSdk roleLevelUp ...")
         if (checkSdkNonInit("roleLevelUp", null)) {
             return
         }
-
-        impl.roleLevelUp(activity, roleInfo)
     }
 
-    /**
-     * 显示退出框
-     *
-     * @param activity Activity上下文
-     * @param callback 退出回调对象
-     */
-    fun openExitView(activity: Activity, callback: (Int, String) -> Unit) {
-        impl.openExitView(activity) { code, result ->
-            callback(code, result)
+    fun openExitView(activity: Activity, callback: ICallback) {
+        Logger.i("EYuanGameSdk openExitView ...")
+
+        exitDialog?.apply {
+            dismiss()
+            exitDialog = null
+        }
+
+        exitDialog = TipsDialog(activity, isLandscape, true)
+        exitDialog?.apply {
+            textView.text = ResUtils.getResString(activity, "yyxx_tv_exit_content")
+            leftButton.text = ResUtils.getResString(activity, "yyxx_tv_exit_left")
+            leftButton.setOnClickListener {
+                if (isShowing) {
+                    dismiss()
+                    exitDialog = null
+                }
+                callback.onResult(0, "退出游戏")
+            }
+            rightButton.text = ResUtils.getResString(activity, "yyxx_tv_exit_right")
+            rightButton.setOnClickListener {
+                if (isShowing) {
+                    dismiss()
+                    exitDialog = null
+                }
+                callback.onResult(-1, "继续游戏")
+            }
+            show()
         }
     }
 
     fun onStart(activity: Activity) {
-        impl.onStart(activity)
+        Logger.i("EYuanGameSdk onStart ...")
     }
 
     fun onRestart(activity: Activity) {
-        impl.onRestart(activity)
+        Logger.i("EYuanGameSdk onRestart ...")
     }
 
     fun onResume(activity: Activity) {
-        impl.onResume(activity)
+        Logger.i("EYuanGameSdk onResume ...")
+        FloatCenterServiceManager.instance.attach()
     }
 
     fun onPause(activity: Activity) {
-        impl.onPause(activity)
+        Logger.i("EYuanGameSdk onPause ...")
+        FloatCenterServiceManager.instance.detach()
     }
 
     fun onStop(activity: Activity) {
-        impl.onStop(activity)
+        Logger.i("EYuanGameSdk onStop ...")
     }
 
     fun onDestroy(activity: Activity) {
-        impl.onDestroy(activity)
+        Logger.i("EYuanGameSdk onDestroy ...")
+        FloatCenterServiceManager.instance.release()
+        MMKVManager.instance.release()
     }
 
     fun onActivityResult(activity: Activity, requestCode: Int, resultCode: Int, data: Intent?) {
-        impl.onActivityResult(activity, requestCode, resultCode, data)
+        Logger.i("EYuanGameSdk onActivityResult ...")
 
+        if (requestCode == HybridFeatureContainer.FILE_CHOOSER_RESULT_CODE_FOR_ANDROID_5) {
+            Logger.d("onActivityResult FILE_CHOOSER_RESULT_CODE_FOR_ANDROID_5")
+            if (HybridFeatureContainer.uploadMessageForAndroid5 == null) {
+                Logger.d("mUploadMessageForAndroid5 == null")
+                return
+            }
+            if (data == null) {
+                HybridFeatureContainer.uploadMessageForAndroid5!!.onReceiveValue(arrayOf())
+                return
+            }
+            val result = if (resultCode != RESULT_OK) null else data.data
+            if (result == null) {
+                HybridFeatureContainer.uploadMessageForAndroid5!!.onReceiveValue(arrayOf())
+            } else {
+                HybridFeatureContainer.uploadMessageForAndroid5!!.onReceiveValue(arrayOf(result))
+            }
+            HybridFeatureContainer.uploadMessageForAndroid5 = null
+        } else if (requestCode == ShareImpl.FACEBOOK_SHARE_RESULT_CODE) {
+            ShareImpl.instance.onShareResult(requestCode, resultCode, data)
+        }
     }
 
     fun onNewIntent(activity: Activity, intent: Intent?) {
-        impl.onNewIntent(activity, intent)
+        Logger.i("EYuanGameSdk onNewIntent ...")
     }
 
-    private fun checkSdkNonInit(function: String, callback: ((Int, String) -> Unit)?): Boolean {
+    private fun checkSdkNonInit(function: String, callback: ICallback?): Boolean {
         return if (!doSdkInit) {
             Logger.e("invoke $function error ... EYuanGameSdk not initialized yet")
-            if (callback != null) {
-                callback(-1, "EYuanGameSdk 还未进行初始化")
-            }
+            callback?.onResult(-1, "EYuanGameSdk 还未进行初始化")
             true
         } else {
             false

+ 0 - 30
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/GameSdkDrive.kt

@@ -1,30 +0,0 @@
-package cn.yyxx.eyuancomm.core.impl
-
-/**
- * @author #Suyghur.
- * Created on 2021/06/09
- */
-class GameSdkDrive {
-
-//    init {
-//        System.loadLibrary("eyuangame")
-//    }
-//
-//    external fun initSdkDrive(context: Context)
-//
-//    external fun setParam(key: String, value: String)
-//
-//    external fun getParam(key: String): String
-//
-//    external fun invokeJob(context: Context, key: String, data: String): String
-//
-//    external fun parseJob(context: Context, key: String, data: String): String
-//
-//    external fun getComm(context: Context): String
-//
-//    companion object {
-//        val instance: GameSdkDrive by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
-//            GameSdkDrive()
-//        }
-//    }
-}

+ 0 - 282
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/GameSdkImpl.kt

@@ -1,282 +0,0 @@
-package cn.yyxx.eyuancomm.core.impl
-
-import android.app.Activity
-import android.app.Activity.RESULT_OK
-import android.content.Context
-import android.content.Intent
-import android.text.TextUtils
-import cn.yyxx.eyuancomm.comm.entity.SdkChargeInfo
-import cn.yyxx.eyuancomm.comm.entity.SdkLoginInfo
-import cn.yyxx.eyuancomm.comm.entity.SdkRoleInfo
-import cn.yyxx.eyuancomm.comm.utils.Logger
-import cn.yyxx.eyuancomm.comm.utils.MMKVManager
-import cn.yyxx.eyuancomm.core.entity.SdkEvent
-import cn.yyxx.eyuancomm.core.entity.bean.InitBean
-import cn.yyxx.eyuancomm.core.impl.center.HybridFeatureContainer
-import cn.yyxx.eyuancomm.core.impl.floatball.FloatCenterServiceManager
-import cn.yyxx.eyuancomm.core.impl.login.LoginActivity
-import cn.yyxx.eyuancomm.core.impl.share.ShareImpl
-import cn.yyxx.eyuancomm.core.internal.IOrder
-import cn.yyxx.eyuancomm.core.network.SdkRequest
-import cn.yyxx.eyuancomm.core.widget.dialog.TipsDialog
-import cn.yyxx.support.ResUtils
-import cn.yyxx.support.device.DeviceInfoUtils
-
-
-/**
- * @author #Suyghur.
- * Created on 2021/06/16
- */
-class GameSdkImpl {
-
-    private var initState = false
-
-    private var isSubmitRoleData = false
-
-    private var exitDialog: TipsDialog? = null
-
-    private var floatBallLogoutCallback: ((Int, String) -> Unit)? = null
-
-    companion object {
-        var isLandscape = false
-        lateinit var initBean: InitBean
-        var floatBallLogoutCallback: ((Int, String) -> Unit)? = null
-
-    }
-
-    fun initialize(activity: Activity, isLandscape: Boolean, callback: (Int, String) -> Unit) {
-        Logger.i("EYuanGameSdk initialize ...")
-        Companion.isLandscape = isLandscape
-        initState = true
-        callback(0, "SDK初始化成功")
-    }
-
-    fun installConfig(activity: Activity, config: String) {
-        initBean = InitBean.toBean(config)
-        cacheImageResource(activity)
-        FloatCenterServiceManager.instance.init(activity)
-    }
-
-    fun setOnFloatBallLogoutCallback(callback: (Int, String) -> Unit) {
-        Companion.floatBallLogoutCallback = callback
-    }
-
-    private fun cacheImageResource(activity: Activity) {
-        //全图标
-        SdkRequest.instance.downloadImageFile(activity, initBean.floatCfg.floatIconUrl)
-        //左边
-        SdkRequest.instance.downloadImageFile(activity, initBean.floatCfg.floatIconLeftUrl)
-        //右边
-        SdkRequest.instance.downloadImageFile(activity, initBean.floatCfg.floatIconRightUrl)
-        //会员中心
-        SdkRequest.instance.downloadImageFile(activity, initBean.floatCfg.floatIconUrl)
-        //礼包
-        SdkRequest.instance.downloadImageFile(activity, initBean.floatCfg.floatIconUrl)
-        //客服
-        SdkRequest.instance.downloadImageFile(activity, initBean.floatCfg.floatIconUrl)
-        //储值
-        SdkRequest.instance.downloadImageFile(activity, initBean.floatCfg.floatIconUrl)
-        //邀请
-        SdkRequest.instance.downloadImageFile(activity, initBean.floatCfg.floatIconUrl)
-    }
-
-    fun login(activity: Activity, isAutoLogin: Boolean, callback: (Int, String) -> Unit) {
-        Logger.i("EYuanGameSdk login ...")
-
-        if (!initState) {
-            Logger.e("登录失败,SDK未初始化或初始化失败")
-            callback(-1, "登录失败,SDK未初始化或初始化失败")
-            return
-        }
-        SdkLoginInfo.instance.reset()
-
-        LoginActivity.login(activity, isAutoLogin) { code, result ->
-//            if (code == 0) {
-//                if (SdkLoginInfo.instance.isRegUser) {
-//                    TraceEventManager.instance.register(activity)
-//                }
-//                FirebaseCrashlytics.getInstance().setUserId(SdkLoginInfo.instance.userId)
-//                TraceEventManager.instance.login(activity)
-//            }
-            callback(code, result)
-        }
-    }
-
-    fun logout(activity: Activity, callback: (Int, String) -> Unit) {
-        Logger.i("EYuanGameSdk logout ...")
-        SdkLoginInfo.instance.reset()
-//        FirebaseCrashlytics.getInstance().setUserId("")
-        FloatCenterServiceManager.instance.detach()
-        callback(0, "用户登出成功")
-    }
-
-    fun charge(activity: Activity, chargeInfo: SdkChargeInfo, callback: (Int, String, IOrder?) -> Unit) {
-        Logger.i("EYuanGameSdk charge ...")
-
-        if (!initState) {
-            Logger.e("支付失败,SDK未初始化或初始化失败")
-            callback(-1, "支付失败,SDK未初始化或初始化失败", null)
-            return
-        }
-        if (TextUtils.isEmpty(SdkLoginInfo.instance.userId)) {
-            Logger.e("支付失败,用户未登录或登录失败")
-            callback(-1, "支付失败,用户未登录或登录失败", null)
-            return
-        }
-        if (!isSubmitRoleData) {
-            Logger.e("支付失败,角色未登录或登录失败")
-            callback(-1, "支付失败,角色未登录或登录失败", null)
-            return
-        }
-        if (!DeviceInfoUtils.isNetworkConnected(activity)) {
-            Logger.e("当前网络连接异常,请重试")
-            callback(-1, "当前网络连接异常,请重试", null)
-            return
-        }
-
-        if (chargeInfo.payment == 3) {
-            // h5支付
-            HybridFeatureContainer(activity, initBean.floatCfg.chargeCfg.url).show()
-        } else {
-            InAppBilling.instance.charge(activity, chargeInfo, object : InAppBilling.InAppBillingCallback {
-                override fun onResult(code: Int, result: String, consumeHandler: IOrder) {
-                    callback(code, result, consumeHandler)
-                }
-            })
-        }
-    }
-
-    fun roleCreate(activity: Activity, roleInfo: SdkRoleInfo) {
-        Logger.i("EYuanGameSdk roleCreate ...")
-        isSubmitRoleData = true
-        submitRoleData(activity, 1, roleInfo)
-    }
-
-    fun roleLauncher(activity: Activity, roleInfo: SdkRoleInfo) {
-        Logger.i("EYuanGameSdk roleLauncher ...")
-        isSubmitRoleData = true
-        submitRoleData(activity, 2, roleInfo)
-    }
-
-    fun roleLevelUp(activity: Activity, roleInfo: SdkRoleInfo) {
-        Logger.i("EYuanGameSdk roleLevelUp ...")
-        submitRoleData(activity, 3, roleInfo)
-    }
-
-    @Deprecated("暂时不需要向服务端上报角色信息")
-    private fun submitRoleData(activity: Activity, timing: Int, roleInfo: SdkRoleInfo) {
-        isSubmitRoleData = true
-        SdkLoginInfo.instance.currentRoleId = roleInfo.roleId
-        SdkLoginInfo.instance.currentRoleName = roleInfo.roleName
-        SdkLoginInfo.instance.currentRoleLevel = roleInfo.roleLevel
-        SdkLoginInfo.instance.currentServerId = roleInfo.serverId
-        SdkLoginInfo.instance.currentServerName = roleInfo.serverName
-//        SdkRequest.instance.submitRoleData(activity, timing, roleInfo, object : IRequestCallback {
-//            override fun onResponse(resultInfo: ResultInfo) {
-//                Logger.d("submitRoleData code : ${resultInfo.code} , msg : ${resultInfo.msg}")
-//            }
-//        })
-    }
-
-    fun openExitView(activity: Activity, callback: (Int, String) -> Unit) {
-        Logger.i("EYuanGameSdk openExitView ...")
-
-        exitDialog?.apply {
-            dismiss()
-            exitDialog = null
-        }
-
-        exitDialog = TipsDialog(activity, isLandscape, true)
-        exitDialog?.apply {
-            textView.text = ResUtils.getResString(activity, "yyxx_tv_exit_content")
-            leftButton.text = ResUtils.getResString(activity, "yyxx_tv_exit_left")
-            leftButton.setOnClickListener {
-                if (isShowing) {
-                    dismiss()
-                    exitDialog = null
-                }
-                callback(0, "退出游戏")
-            }
-            rightButton.text = ResUtils.getResString(activity, "yyxx_tv_exit_right")
-            rightButton.setOnClickListener {
-                if (isShowing) {
-                    dismiss()
-                    exitDialog = null
-                }
-                callback(-1, "继续游戏")
-            }
-            show()
-        }
-    }
-
-    fun onStart(activity: Activity) {
-        Logger.i("EYuanGameSdk onStart ...")
-    }
-
-    fun onRestart(activity: Activity) {
-        Logger.i("EYuanGameSdk onRestart ...")
-    }
-
-    fun onResume(activity: Activity) {
-        Logger.i("EYuanGameSdk onResume ...")
-        FloatCenterServiceManager.instance.attach()
-//        TraceEventManager.instance.resume(activity)
-    }
-
-    fun onPause(activity: Activity) {
-        Logger.i("EYuanGameSdk onPause ...")
-        FloatCenterServiceManager.instance.detach()
-//        TraceEventManager.instance.pause(activity)
-    }
-
-    fun onStop(activity: Activity) {
-        Logger.i("EYuanGameSdk onStop ...")
-    }
-
-    fun onDestroy(activity: Activity) {
-        Logger.i("EYuanGameSdk onDestroy ...")
-        FloatCenterServiceManager.instance.release()
-//        TraceEventManager.instance.release()
-        MMKVManager.instance.release()
-    }
-
-    fun onActivityResult(activity: Activity, requestCode: Int, resultCode: Int, data: Intent?) {
-        Logger.i("EYuanGameSdk onActivityResult ...")
-
-        if (requestCode == HybridFeatureContainer.FILE_CHOOSER_RESULT_CODE_FOR_ANDROID_5) {
-            Logger.d("onActivityResult FILE_CHOOSER_RESULT_CODE_FOR_ANDROID_5")
-            if (HybridFeatureContainer.uploadMessageForAndroid5 == null) {
-                Logger.d("mUploadMessageForAndroid5 == null")
-                return
-            }
-            if (data == null) {
-                HybridFeatureContainer.uploadMessageForAndroid5!!.onReceiveValue(arrayOf())
-                return
-            }
-            val result = if (resultCode != RESULT_OK) null else data.data
-            if (result == null) {
-                HybridFeatureContainer.uploadMessageForAndroid5!!.onReceiveValue(arrayOf())
-            } else {
-                HybridFeatureContainer.uploadMessageForAndroid5!!.onReceiveValue(arrayOf(result))
-            }
-            HybridFeatureContainer.uploadMessageForAndroid5 = null
-        } else if (requestCode == ShareImpl.FACEBOOK_SHARE_RESULT_CODE) {
-            ShareImpl.instance.onShareResult(requestCode, resultCode, data)
-        }
-    }
-
-    fun onNewIntent(activity: Activity, intent: Intent?) {
-        Logger.i("EYuanGameSdk onNewIntent ...")
-    }
-
-    fun traceEvent(context: Context, sdkEvent: SdkEvent) {
-        Logger.i("EYuanGameSdk linkingEvent ...")
-//        TraceEventManager.instance.extEvent(context, sdkEvent)
-    }
-
-    fun share(activity: Activity, line: String, tag: String, quote: String, callback: (Int, String) -> Unit) {
-        Logger.i("EYuanGameSdk share ...")
-        ShareImpl.instance.invokeShare2Fb(activity, line, tag, quote, callback)
-    }
-
-}

+ 43 - 36
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/InAppBilling.kt

@@ -2,8 +2,8 @@ package cn.yyxx.eyuancomm.core.impl
 
 import android.app.Activity
 import cn.yyxx.eyuancomm.comm.entity.SdkChargeInfo
+import cn.yyxx.eyuancomm.comm.internal.ICallback
 import cn.yyxx.eyuancomm.comm.utils.Logger
-import cn.yyxx.eyuancomm.core.internal.IOrder
 import cn.yyxx.support.ResUtils
 import cn.yyxx.support.hawkeye.ToastUtils
 import com.android.billingclient.api.*
@@ -19,20 +19,21 @@ internal class InAppBilling : PurchasesUpdatedListener {
 
     private var billingClient: BillingClient? = null
 
-    private var callback: InAppBillingCallback? = null
+    private var callback: ICallback? = null
 
-    private val consumeHandler = object : IOrder {
-        override fun onConsume(activity: Activity, chargeInfo: SdkChargeInfo, token: String, cache: Boolean) {
-            if (cache) {
-                consumeCacheOrder(activity, chargeInfo, token)
-            } else {
-                consumeOrder(activity, chargeInfo, token)
-            }
-        }
-        override fun onFinish() {
-            disConnection()
-        }
-    }
+//    private val consumeHandler = object : IOrder {
+//        override fun onConsume(activity: Activity, chargeInfo: SdkChargeInfo, token: String, cache: Boolean) {
+//            if (cache) {
+//                consumeCacheOrder(activity, chargeInfo, token)
+//            } else {
+//                consumeOrder(activity, chargeInfo, token)
+//            }
+//        }
+//
+//        override fun onFinish() {
+//            disConnection()
+//        }
+//    }
 
     companion object {
         val instance: InAppBilling by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
@@ -40,17 +41,27 @@ internal class InAppBilling : PurchasesUpdatedListener {
         }
     }
 
-    fun charge(activity: Activity, chargeInfo: SdkChargeInfo, callback: InAppBillingCallback) {
+    fun charge(activity: Activity, chargeInfo: SdkChargeInfo, callback: ICallback) {
         this.callback = callback
         if (checkGoogleApiAvailability(activity)) {
             initializeBillingClient(activity)
             connectGooglePlay(activity, chargeInfo)
         } else {
             ToastUtils.toastInfo(activity, "Your phone or Google account does not support In-app Billing")
-            callback.onResult(-1, "谷歌iab支付服务不可用", consumeHandler)
+            callback.onResult(-1, "谷歌iab支付服务不可用")
         }
     }
 
+    fun consumeOrder(activity: Activity, chargeInfo: SdkChargeInfo, token: String, cache: Boolean) {
+        if (cache) {
+            consumeCacheOrder(activity, chargeInfo, token)
+        } else {
+            consumeOrder(activity, chargeInfo, token)
+        }
+    }
+
+    fun disconnectPlayService() = disConnection()
+
     /**
      * 初始化IAB收银台客户端
      */
@@ -71,7 +82,7 @@ internal class InAppBilling : PurchasesUpdatedListener {
                     if (billingResult.isOk()) {
                         queryChargeInfo(activity, chargeInfo)
                     } else {
-                        callback?.onResult(-1, "连接谷歌商店失败", consumeHandler)
+                        callback?.onResult(-1, "连接谷歌商店失败")
                         disConnection()
                     }
                 }
@@ -103,7 +114,7 @@ internal class InAppBilling : PurchasesUpdatedListener {
                     val jsonObject = JSONObject()
                     jsonObject.put("order_id", purchase.accountIdentifiers?.obfuscatedAccountId)
                     jsonObject.put("order_notify_data", purchase.originalJson)
-                    callback?.onResult(2, jsonObject.toString(), consumeHandler)
+                    callback?.onResult(2, jsonObject.toString())
                 }
             }
         }
@@ -122,7 +133,7 @@ internal class InAppBilling : PurchasesUpdatedListener {
                 //查询商品信息失败
                 Logger.e("查询商品信息失败")
                 ToastUtils.toastInfo(activity, ResUtils.getResString(activity, "yyxx_charge_tv_error"))
-                callback?.onResult(-1, "查询商品信息失败", consumeHandler)
+                callback?.onResult(-1, "查询商品信息失败")
                 disConnection()
             } else {
                 if (list.size == 1) {
@@ -131,7 +142,7 @@ internal class InAppBilling : PurchasesUpdatedListener {
                     launchBillingFlow(activity, chargeInfo, skuDetails)
                 } else {
                     ToastUtils.toastInfo(activity, ResUtils.getResString(activity, "yyxx_charge_tv_error"))
-                    callback?.onResult(-1, "查询商品信息异常", consumeHandler)
+                    callback?.onResult(-1, "查询商品信息异常")
                     disConnection()
                 }
             }
@@ -149,12 +160,12 @@ internal class InAppBilling : PurchasesUpdatedListener {
                 billingResult.log("launchBillingFlow")
                 if (!billingResult.isOk()) {
                     ToastUtils.toastInfo(activity, ResUtils.getResString(activity, "yyxx_charge_tv_error"))
-                    callback?.onResult(-1, "启动谷歌收银台失败", consumeHandler)
+                    callback?.onResult(-1, "启动谷歌收银台失败")
                     disConnection()
                 }
             } else {
                 ToastUtils.toastInfo(activity, ResUtils.getResString(activity, "yyxx_charge_tv_error"))
-                callback?.onResult(-1, "启动谷歌收银台失败", consumeHandler)
+                callback?.onResult(-1, "启动谷歌收银台失败")
                 disConnection()
             }
         }
@@ -163,30 +174,30 @@ internal class InAppBilling : PurchasesUpdatedListener {
     /**
      * 消耗订单
      */
-    fun consumeOrder(activity: Activity, chargeInfo: SdkChargeInfo, token: String) {
+    private fun consumeOrder(activity: Activity, chargeInfo: SdkChargeInfo, token: String) {
         val consumeParams = ConsumeParams.newBuilder().setPurchaseToken(token).build()
         billingClient?.apply {
             if (isReady) {
                 consumeAsync(consumeParams) { billingResult, _ ->
                     billingResult.log("onConsumeResponse")
                     if (billingResult.isOk()) {
-                        callback?.onResult(0, "支付流程完成", consumeHandler)
+                        callback?.onResult(0, "支付流程完成")
                         disConnection()
                     } else {
                         ToastUtils.toastInfo(activity, ResUtils.getResString(activity, "yyxx_charge_tv_error"))
-                        callback?.onResult(-1, "消耗订单异常", consumeHandler)
+                        callback?.onResult(-1, "消耗订单异常")
                         disConnection()
                     }
                 }
             } else {
                 ToastUtils.toastInfo(activity, ResUtils.getResString(activity, "yyxx_charge_tv_error"))
-                callback?.onResult(-1, "消耗订单异常", consumeHandler)
+                callback?.onResult(-1, "消耗订单异常")
                 disConnection()
             }
         }
     }
 
-    fun consumeCacheOrder(activity: Activity, chargeInfo: SdkChargeInfo, token: String) {
+    private fun consumeCacheOrder(activity: Activity, chargeInfo: SdkChargeInfo, token: String) {
         val consumeParams = ConsumeParams.newBuilder().setPurchaseToken(token).build()
         billingClient?.apply {
             if (isReady) {
@@ -196,13 +207,13 @@ internal class InAppBilling : PurchasesUpdatedListener {
                         querySkuDetails(activity, chargeInfo)
                     } else {
                         ToastUtils.toastInfo(activity, ResUtils.getResString(activity, "yyxx_charge_tv_error"))
-                        callback?.onResult(-1, "消耗订单异常", consumeHandler)
+                        callback?.onResult(-1, "消耗订单异常")
                         disConnection()
                     }
                 }
             } else {
                 ToastUtils.toastInfo(activity, ResUtils.getResString(activity, "yyxx_charge_tv_error"))
-                callback?.onResult(-1, "消耗订单异常", consumeHandler)
+                callback?.onResult(-1, "消耗订单异常")
                 disConnection()
             }
         }
@@ -237,21 +248,17 @@ internal class InAppBilling : PurchasesUpdatedListener {
         if (billingResult.isOk()) {
             if (list.isNullOrEmpty()) {
                 disConnection()
-                callback?.onResult(-1, "支付失败", consumeHandler)
+                callback?.onResult(-1, "支付失败")
             } else {
                 val purchase = list[0]
                 val jsonObject = JSONObject()
                 jsonObject.put("order_id", purchase.accountIdentifiers?.obfuscatedAccountId)
                 jsonObject.put("order_notify_data", purchase.originalJson)
-                callback?.onResult(1, jsonObject.toString(), consumeHandler)
+                callback?.onResult(1, jsonObject.toString())
             }
         } else {
-            callback?.onResult(-1, "支付失败", consumeHandler)
+            callback?.onResult(-1, "支付失败")
             disConnection()
         }
     }
-
-    interface InAppBillingCallback {
-        fun onResult(code: Int, result: String, consumeHandler: IOrder)
-    }
 }

+ 6 - 2
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/SdkJsImpl.kt

@@ -7,11 +7,15 @@ import cn.yyxx.eyuancomm.comm.utils.Logger
  * @author #Suyghur.
  * Created on 2021/07/28
  */
-class SdkJsImpl(val callback: (String, String) -> String) {
+class SdkJsImpl(val callback: IJsCallback) {
 
     @JavascriptInterface
     fun jsCallback(method: String, data: String): String {
         Logger.d("jsCallback method : $method , data : $data")
-        return callback(method, data)
+        return callback.onResult(method, data)
+    }
+
+    interface IJsCallback {
+        fun onResult(method: String, data: String): String
     }
 }

+ 14 - 4
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/center/BindAccountContainer.kt

@@ -11,11 +11,12 @@ import android.view.Window
 import android.view.WindowManager
 import android.widget.Button
 import android.widget.ImageView
+import android.widget.TextView
 import cn.yyxx.eyuancomm.comm.entity.SdkLoginInfo
 import cn.yyxx.eyuancomm.core.entity.ClickType
-import cn.yyxx.eyuancomm.core.ext.filterAccount
-import cn.yyxx.eyuancomm.core.ext.filterPwd
-import cn.yyxx.eyuancomm.core.impl.GameSdkImpl
+import cn.yyxx.eyuancomm.comm.ext.filterAccount
+import cn.yyxx.eyuancomm.comm.ext.filterPwd
+import cn.yyxx.eyuancomm.core.EYuanGameSdk
 import cn.yyxx.eyuancomm.core.network.SdkRequest
 import cn.yyxx.eyuancomm.core.widget.EventEditText
 import cn.yyxx.support.DensityUtils
@@ -30,8 +31,10 @@ import org.json.JSONObject
 class BindAccountContainer(context: Context, private val callback: (Int, String) -> Unit) : Dialog(context) {
 
     private lateinit var ivReturn: ImageView
+    private lateinit var tvTitle: TextView
     private lateinit var eetAccount: EventEditText
     private lateinit var eetPwd: EventEditText
+    private lateinit var tvTips: TextView
     private lateinit var btnConfirm: Button
 
     private var imgShow = 0
@@ -50,7 +53,7 @@ class BindAccountContainer(context: Context, private val callback: (Int, String)
 
         val attr = window?.attributes as WindowManager.LayoutParams
         attr.height = DensityUtils.dip2px(context, 250f)
-        if (GameSdkImpl.isLandscape) {
+        if (EYuanGameSdk.isLandscape) {
             attr.width = DensityUtils.getHeightAndWidth(context)[0] / 2
         } else {
             attr.width = DensityUtils.getHeightAndWidth(context)[0] - 80
@@ -68,6 +71,9 @@ class BindAccountContainer(context: Context, private val callback: (Int, String)
             }
         }
 
+        tvTitle = findViewById(ResUtils.getResId(context, "yyxx_tv_title", "id"))
+        tvTitle.text = ResUtils.getResString(context, "yyxx_tv_bind_account")
+
         eetAccount = findViewById(ResUtils.getResId(context, "yyxx_eet_account", "id"))
         eetAccount.apply {
             leftImageView.setBackgroundResource(ResUtils.getResId(context, "yyxx_account_img", "drawable"))
@@ -98,7 +104,11 @@ class BindAccountContainer(context: Context, private val callback: (Int, String)
             }
         }
 
+        tvTips = findViewById(ResUtils.getResId(context, "yyxx_tv_tips", "id"))
+        tvTips.text = ResUtils.getResString(context, "yyxx_tv_bind_account_tips")
+
         btnConfirm = findViewById(ResUtils.getResId(context, "yyxx_btn_confirm", "id"))
+        btnConfirm.text = ResUtils.getResString(context, "yyxx_tv_confirm")
         btnConfirm.apply {
             setOnClickListener {
                 callBindAccount()

+ 17 - 19
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/center/BindEmailContainer.kt

@@ -15,8 +15,8 @@ import android.widget.LinearLayout
 import android.widget.TextView
 import cn.yyxx.eyuancomm.comm.entity.SdkLoginInfo
 import cn.yyxx.eyuancomm.comm.ext.setThrottleListener
-import cn.yyxx.eyuancomm.core.ext.countDownCoroutines
-import cn.yyxx.eyuancomm.core.impl.GameSdkImpl
+import cn.yyxx.eyuancomm.comm.ext.countDownCoroutines
+import cn.yyxx.eyuancomm.core.EYuanGameSdk
 import cn.yyxx.eyuancomm.core.network.SdkRequest
 import cn.yyxx.eyuancomm.core.widget.EventEditText
 import cn.yyxx.support.DensityUtils
@@ -33,12 +33,15 @@ class BindEmailContainer(context: Context, private val callback: (Int, String) -
     private lateinit var llGroup: LinearLayout
     private lateinit var clTips: LinearLayout
 
+
     private lateinit var ivReturn: ImageView
+    private lateinit var tvTitle: TextView
     private lateinit var eetEmail: EventEditText
     private lateinit var eetCaptcha: EventEditText
     private lateinit var btnCaptCha: Button
     private lateinit var btnConfirm: Button
-    private lateinit var tvBindTips: TextView
+    private lateinit var tvBindTips1: TextView
+    private lateinit var tvBindTips2: TextView
 
     private var job: Job? = null
 
@@ -54,7 +57,7 @@ class BindEmailContainer(context: Context, private val callback: (Int, String) -
 
         val attr = window?.attributes as WindowManager.LayoutParams
         attr.height = DensityUtils.dip2px(context, 250f)
-        if (GameSdkImpl.isLandscape) {
+        if (EYuanGameSdk.isLandscape) {
             attr.width = DensityUtils.getHeightAndWidth(context)[0] / 2
         } else {
             attr.width = DensityUtils.getHeightAndWidth(context)[0] - 80
@@ -63,11 +66,13 @@ class BindEmailContainer(context: Context, private val callback: (Int, String) -
 
 
         ivReturn = findViewById(ResUtils.getResId(context, "yyxx_iv_return", "id"))
-
         ivReturn.setOnClickListener {
             dismiss()
         }
 
+        tvTitle = findViewById(ResUtils.getResId(context, "yyxx_tv_title", "id"))
+        tvTitle.text = ResUtils.getResString(context, "yyxx_tv_bind_email")
+
         llGroup = findViewById(ResUtils.getResId(context, "yyxx_ll_group", "id"))
         clTips = findViewById(ResUtils.getResId(context, "yyxx_ll_tips", "id"))
 
@@ -80,17 +85,22 @@ class BindEmailContainer(context: Context, private val callback: (Int, String) -
         eetCaptcha.editText.hint = ResUtils.getResString(context, "yyxx_hint_bind_phone_captcha")
 
         btnCaptCha = findViewById(ResUtils.getResId(context, "yyxx_btn_captcha", "id"))
+        btnCaptCha.text = ResUtils.getResString(context, "yyxx_tv_get_captcha")
         btnCaptCha.setThrottleListener {
             callGetCaptcha()
         }
 
         btnConfirm = findViewById(ResUtils.getResId(context, "yyxx_btn_confirm", "id"))
+        btnConfirm.text = ResUtils.getResString(context, "yyxx_tv_confirm")
         btnConfirm.setThrottleListener {
             callBindEmail()
         }
 
-        tvBindTips = findViewById(ResUtils.getResId(context, "yyxx_tv_tips2", "id"))
-        tvBindTips.text = if (SdkLoginInfo.instance.email.length > 6) {
+        tvBindTips1 = findViewById(ResUtils.getResId(context, "yyxx_tv_tips1", "id"))
+        tvBindTips1.text = ResUtils.getResString(context, "yyxx_iv_bind_email_tips")
+
+        tvBindTips2 = findViewById(ResUtils.getResId(context, "yyxx_tv_tips2", "id"))
+        tvBindTips2.text = if (SdkLoginInfo.instance.email.length > 6) {
             val head = SdkLoginInfo.instance.email.substring(0, 3)
             val index = SdkLoginInfo.instance.email.indexOf("@")
             val foot = SdkLoginInfo.instance.email.substring(index, SdkLoginInfo.instance.email.length)
@@ -163,18 +173,6 @@ class BindEmailContainer(context: Context, private val callback: (Int, String) -
         }
     }
 
-    private fun changeTimeView(time: Int) {
-        btnCaptCha.apply {
-            text = if (time <= 0) {
-                this.isEnabled = true
-                ResUtils.getResString(context, "yyxx_tv_get_captcha")
-            } else {
-                this.isEnabled = false
-                "${time}s"
-            }
-        }
-    }
-
     private fun changeTimeNum() {
         job?.apply {
             cancel()

+ 22 - 14
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/center/BindPhoneContainer.kt

@@ -9,10 +9,10 @@ import android.view.*
 import android.widget.*
 import cn.yyxx.eyuancomm.comm.entity.SdkLoginInfo
 import cn.yyxx.eyuancomm.comm.ext.setThrottleListener
-import cn.yyxx.eyuancomm.core.ext.countDownCoroutines
-import cn.yyxx.eyuancomm.core.ext.filterPhone
-import cn.yyxx.eyuancomm.core.ext.filterPwd
-import cn.yyxx.eyuancomm.core.impl.GameSdkImpl
+import cn.yyxx.eyuancomm.comm.ext.countDownCoroutines
+import cn.yyxx.eyuancomm.comm.ext.filterPhone
+import cn.yyxx.eyuancomm.comm.ext.filterPwd
+import cn.yyxx.eyuancomm.core.EYuanGameSdk
 import cn.yyxx.eyuancomm.core.network.SdkRequest
 import cn.yyxx.eyuancomm.core.widget.EventEditText
 import cn.yyxx.support.DensityUtils
@@ -31,13 +31,15 @@ class BindPhoneContainer(context: Context, private val callback: (Int, String) -
     private lateinit var llTips: LinearLayout
 
     private lateinit var ivReturn: ImageView
+    private lateinit var tvTitle: TextView
     private lateinit var eetPhone: EventEditText
     private lateinit var eetCaptcha: EventEditText
     private lateinit var btnCaptCha: Button
     private lateinit var btnConfirm: Button
     private lateinit var tvArea: TextView
     private lateinit var ivArrow: ImageView
-    private lateinit var tvBindTips: TextView
+    private lateinit var tvBindTips1: TextView
+    private lateinit var tvBindTips2: TextView
 
     private lateinit var rlAreaList: RelativeLayout
     private lateinit var llAreaList: LinearLayout
@@ -63,7 +65,7 @@ class BindPhoneContainer(context: Context, private val callback: (Int, String) -
 
         val attr = window?.attributes as WindowManager.LayoutParams
         attr.height = DensityUtils.dip2px(context, 250f)
-        if (GameSdkImpl.isLandscape) {
+        if (EYuanGameSdk.isLandscape) {
             attr.width = DensityUtils.getHeightAndWidth(context)[0] / 2
         } else {
             attr.width = DensityUtils.getHeightAndWidth(context)[0] - 80
@@ -74,12 +76,13 @@ class BindPhoneContainer(context: Context, private val callback: (Int, String) -
         imgDown = ResUtils.getResId(context, "yyxx_pack_down_white_img", "drawable")
 
         ivReturn = findViewById(ResUtils.getResId(context, "yyxx_iv_return", "id"))
-
         ivReturn.setOnClickListener {
             dismiss()
-
         }
 
+        tvTitle = findViewById(ResUtils.getResId(context, "yyxx_tv_title", "id"))
+        tvTitle.text = ResUtils.getResString(context, "yyxx_tv_bind_phone")
+
         llGroup1 = findViewById(ResUtils.getResId(context, "yyxx_ll_group1", "id"))
         llGroup2 = findViewById(ResUtils.getResId(context, "yyxx_ll_group2", "id"))
         llTips = findViewById(ResUtils.getResId(context, "yyxx_ll_tips", "id"))
@@ -91,12 +94,13 @@ class BindPhoneContainer(context: Context, private val callback: (Int, String) -
         eetCaptcha.editText.hint = ResUtils.getResString(context, "yyxx_hint_bind_phone_captcha")
 
         btnCaptCha = findViewById(ResUtils.getResId(context, "yyxx_btn_captcha", "id"))
+        btnCaptCha.text = ResUtils.getResString(context, "yyxx_tv_get_captcha")
         btnCaptCha.setThrottleListener {
             callGetCaptcha()
         }
 
-
         btnConfirm = findViewById(ResUtils.getResId(context, "yyxx_btn_confirm", "id"))
+        btnConfirm.text = ResUtils.getResString(context, "yyxx_tv_confirm")
         btnConfirm.setThrottleListener {
             callBindPhone()
         }
@@ -106,8 +110,9 @@ class BindPhoneContainer(context: Context, private val callback: (Int, String) -
         llAreaList = findViewById(ResUtils.getResId(context, "yyxx_ll_area_list", "id"))
         svAreaList = findViewById(ResUtils.getResId(context, "yyxx_sv_area_list", "id"))
 
-
         tvArea = findViewById(ResUtils.getResId(context, "yyxx_tv_area", "id"))
+        tvArea.text = ResUtils.getResString(context, "yyxx_tv_area_code")
+
         ivArrow = findViewById(ResUtils.getResId(context, "yyxx_iv_arrow", "id"))
         ivArrow.setOnClickListener {
             changeAreaList()
@@ -115,7 +120,10 @@ class BindPhoneContainer(context: Context, private val callback: (Int, String) -
 
         autoFillAreaList(context)
 
-        tvBindTips = findViewById(ResUtils.getResId(context, "yyxx_tv_tips2", "id"))
+        tvBindTips1 = findViewById(ResUtils.getResId(context, "yyxx_tv_tips1", "id"))
+        tvBindTips1.text = ResUtils.getResString(context, "yyxx_iv_bind_phone_tips1")
+
+        tvBindTips2 = findViewById(ResUtils.getResId(context, "yyxx_tv_tips2", "id"))
         val tipsPhone = if (SdkLoginInfo.instance.phoneNum.length > 6) {
             val head = SdkLoginInfo.instance.phoneNum.substring(0, 3)
             val foot = SdkLoginInfo.instance.phoneNum.substring(SdkLoginInfo.instance.phoneNum.length - 3, SdkLoginInfo.instance.phoneNum.length)
@@ -123,13 +131,13 @@ class BindPhoneContainer(context: Context, private val callback: (Int, String) -
         } else {
             SdkLoginInfo.instance.phoneNum
         }
-        tvBindTips.text = "${ResUtils.getResString(context, "yyxx_iv_bind_phone_tips2")}$tipsPhone"
+        tvBindTips2.text = "${ResUtils.getResString(context, "yyxx_iv_bind_phone_tips2")}$tipsPhone"
 
         showOrHideTips()
     }
 
     private fun autoFillAreaList(context: Context) {
-        if (GameSdkImpl.initBean.areaCodeList.isNullOrEmpty()) {
+        if (EYuanGameSdk.initBean.areaCodeList.isNullOrEmpty()) {
             //默认4个地区
             areaCodeList.add("86")
             //香港
@@ -139,7 +147,7 @@ class BindPhoneContainer(context: Context, private val callback: (Int, String) -
             //台湾
             areaCodeList.add("886")
         } else {
-            GameSdkImpl.initBean.areaCodeList.forEach {
+            EYuanGameSdk.initBean.areaCodeList.forEach {
                 areaCodeList.add(it)
             }
         }

+ 20 - 12
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/center/HybridFeatureContainer.kt

@@ -15,10 +15,11 @@ import android.widget.FrameLayout
 import android.widget.ImageView
 import cn.yyxx.eyuancomm.comm.entity.SdkLoginInfo
 import cn.yyxx.eyuancomm.comm.impl.CommSdkDrive
+import cn.yyxx.eyuancomm.comm.internal.ICallback
 import cn.yyxx.eyuancomm.comm.network.Host
 import cn.yyxx.eyuancomm.comm.utils.Logger
 import cn.yyxx.eyuancomm.comm.widget.ScaleLoadingDialog
-import cn.yyxx.eyuancomm.core.impl.GameSdkImpl
+import cn.yyxx.eyuancomm.core.EYuanGameSdk
 import cn.yyxx.eyuancomm.core.impl.SdkJsImpl
 import cn.yyxx.eyuancomm.core.impl.share.ShareImpl
 import cn.yyxx.eyuancomm.core.network.SdkRequest
@@ -45,20 +46,22 @@ class HybridFeatureContainer(private val activity: Activity, private val url: St
     private lateinit var ivClose: ImageView
     private var loadingDialog: ScaleLoadingDialog? = null
 
-    private val jsCallback = object : (String, String) -> String {
-        override fun invoke(method: String, data: String): String {
-            when (method) {
+    private val jsCallback = object : SdkJsImpl.IJsCallback {
+        override fun onResult(method: String, data: String): String {
+            return when (method) {
                 "getCommon" -> return CommSdkDrive.instance.getCommMap()
                 "getToken" -> return SdkLoginInfo.instance.token
                 "close" -> {
                     activity.runOnUiThread {
                         dismiss()
                     }
+                    ""
                 }
                 "back" -> {
                     activity.runOnUiThread {
                         onBackPressed()
                     }
+                    ""
                 }
                 "facebookShare" -> {
                     kotlin.runCatching {
@@ -78,14 +81,17 @@ class HybridFeatureContainer(private val activity: Activity, private val url: St
                         } else {
                             ""
                         }
-                        ShareImpl.instance.invokeShare2Fb(activity, line, tag, quote) { code, result ->
-                            if (code == 0) {
-                                webView.loadUrl("javascript:wk.FBShareCallback(1)")
-                            } else {
-                                webView.loadUrl("javascript:wk.FBShareCallback(-1)")
+                        ShareImpl.instance.invokeShare2Fb(activity, line, tag, quote, object : ICallback {
+                            override fun onResult(code: Int, result: String) {
+                                if (code == 0) {
+                                    webView.loadUrl("javascript:wk.FBShareCallback(1)")
+                                } else {
+                                    webView.loadUrl("javascript:wk.FBShareCallback(-1)")
+                                }
                             }
-                        }
+                        })
                     }
+                    ""
                 }
                 "getRoleInfo" -> {
                     val jsonObject = JSONObject()
@@ -107,6 +113,7 @@ class HybridFeatureContainer(private val activity: Activity, private val url: St
                             dismiss()
                         }
                     }
+                    ""
                 }
                 "submitLog" -> {
                     SdkRequest.instance.uploadLogFile(activity, true) { resultInfo ->
@@ -114,9 +121,10 @@ class HybridFeatureContainer(private val activity: Activity, private val url: St
                             ToastUtils.toastInfo(activity, resultInfo.msg)
                         }
                     }
+                    ""
                 }
+                else -> ""
             }
-            return ""
         }
     }
 
@@ -133,7 +141,7 @@ class HybridFeatureContainer(private val activity: Activity, private val url: St
 
         val attr = window?.attributes as WindowManager.LayoutParams
         attr.height = ViewGroup.LayoutParams.WRAP_CONTENT
-        if (GameSdkImpl.isLandscape) {
+        if (EYuanGameSdk.isLandscape) {
             attr.width = (3 * DensityUtils.getHeightAndWidth(context)[0]) / 4
         } else {
             attr.width = DensityUtils.getHeightAndWidth(context)[0] - 80

+ 22 - 2
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/center/MemberCenterContainer.kt

@@ -14,7 +14,7 @@ import android.widget.LinearLayout
 import android.widget.TextView
 import cn.yyxx.eyuancomm.comm.entity.SdkLoginInfo
 import cn.yyxx.eyuancomm.core.entity.LoginType
-import cn.yyxx.eyuancomm.core.impl.GameSdkImpl
+import cn.yyxx.eyuancomm.core.EYuanGameSdk
 import cn.yyxx.support.DensityUtils
 import cn.yyxx.support.ResUtils
 
@@ -25,6 +25,7 @@ import cn.yyxx.support.ResUtils
 class MemberCenterContainer(context: Context) : Dialog(context) {
 
     private lateinit var ivReturn: ImageView
+    private lateinit var tvTitle: TextView
     private lateinit var llBindAccount: LinearLayout
     private lateinit var llBindPhone: LinearLayout
     private lateinit var llBindEmail: LinearLayout
@@ -32,6 +33,11 @@ class MemberCenterContainer(context: Context) : Dialog(context) {
 
     private lateinit var ivAccountIcon: ImageView
     private lateinit var tvAccountTips: TextView
+    private lateinit var tvAccountDesc: TextView
+
+    private lateinit var tvPhoneDesc: TextView
+    private lateinit var tvEmailDesc: TextView
+    private lateinit var tvModifyPwdDesc: TextView
 
     private var bindAccountContainer: BindAccountContainer? = null
     private var bindPhoneContainer: BindPhoneContainer? = null
@@ -51,7 +57,7 @@ class MemberCenterContainer(context: Context) : Dialog(context) {
 
         val attr = window?.attributes as WindowManager.LayoutParams
         attr.height = DensityUtils.dip2px(context, 250f)
-        if (GameSdkImpl.isLandscape) {
+        if (EYuanGameSdk.isLandscape) {
             attr.width = DensityUtils.getHeightAndWidth(context)[0] / 2
         } else {
             attr.width = DensityUtils.getHeightAndWidth(context)[0] - 80
@@ -63,6 +69,8 @@ class MemberCenterContainer(context: Context) : Dialog(context) {
             dismiss()
         }
 
+        tvTitle = findViewById(ResUtils.getResId(context, "yyxx_tv_title", "id"))
+        tvTitle.text = ResUtils.getResString(context, "yyxx_tv_member_center_title")
 
         llBindAccount = findViewById(ResUtils.getResId(context, "yyxx_ll_bind_account", "id"))
         llBindAccount.setOnClickListener {
@@ -143,6 +151,18 @@ class MemberCenterContainer(context: Context) : Dialog(context) {
         ivAccountIcon.setImageResource(img)
         tvAccountTips.text = tips
 
+        tvAccountDesc = findViewById(ResUtils.getResId(context, "yyxx_tv_bind_account_desc", "id"))
+        tvAccountDesc.text = ResUtils.getResString(context, "yyxx_tv_bind_account")
+
+        tvPhoneDesc = findViewById(ResUtils.getResId(context, "yyxx_tv_bind_phone_desc", "id"))
+        tvPhoneDesc.text = ResUtils.getResString(context, "yyxx_tv_bind_phone")
+
+        tvEmailDesc = findViewById(ResUtils.getResId(context, "yyxx_tv_bind_email_desc", "id"))
+        tvEmailDesc.text = ResUtils.getResString(context, "yyxx_tv_bind_email")
+
+        tvModifyPwdDesc = findViewById(ResUtils.getResId(context, "yyxx_tv_modify_pwd_desc", "id"))
+        tvModifyPwdDesc.text = ResUtils.getResString(context, "yyxx_tv_modify_pwd")
+
         showOrHideBindAccount()
         showOrHideBindPhone()
         showOrHideBindEmail()

+ 9 - 3
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/center/ModifyPwdContainer.kt

@@ -11,9 +11,10 @@ import android.view.Window
 import android.view.WindowManager
 import android.widget.Button
 import android.widget.ImageView
+import android.widget.TextView
 import cn.yyxx.eyuancomm.comm.entity.SdkLoginInfo
-import cn.yyxx.eyuancomm.core.ext.filterPwd
-import cn.yyxx.eyuancomm.core.impl.GameSdkImpl
+import cn.yyxx.eyuancomm.comm.ext.filterPwd
+import cn.yyxx.eyuancomm.core.EYuanGameSdk
 import cn.yyxx.eyuancomm.core.network.SdkRequest
 import cn.yyxx.eyuancomm.core.widget.EventEditText
 import cn.yyxx.support.DensityUtils
@@ -28,6 +29,7 @@ import org.json.JSONObject
 class ModifyPwdContainer(context: Context) : Dialog(context) {
 
     private lateinit var ivReturn: ImageView
+    private lateinit var tvTitle: TextView
     private lateinit var eetOldPwd: EventEditText
     private lateinit var eetNewPwd: EventEditText
     private lateinit var btnConfirm: Button
@@ -49,7 +51,7 @@ class ModifyPwdContainer(context: Context) : Dialog(context) {
 
         val attr = window?.attributes as WindowManager.LayoutParams
         attr.height = DensityUtils.dip2px(context, 250f)
-        if (GameSdkImpl.isLandscape) {
+        if (EYuanGameSdk.isLandscape) {
             attr.width = DensityUtils.getHeightAndWidth(context)[0] / 2
         } else {
             attr.width = DensityUtils.getHeightAndWidth(context)[0] - 80
@@ -64,6 +66,9 @@ class ModifyPwdContainer(context: Context) : Dialog(context) {
             dismiss()
         }
 
+        tvTitle = findViewById(ResUtils.getResId(context, "yyxx_tv_title", "id"))
+        tvTitle.text = ResUtils.getResString(context, "yyxx_tv_modify_pwd")
+
         eetOldPwd = findViewById(ResUtils.getResId(context, "yyxx_eet_old_pwd", "id"))
         eetOldPwd.apply {
             editText.inputType = InputType.TYPE_TEXT_VARIATION_PASSWORD or InputType.TYPE_CLASS_TEXT
@@ -110,6 +115,7 @@ class ModifyPwdContainer(context: Context) : Dialog(context) {
         }
 
         btnConfirm = findViewById(ResUtils.getResId(context, "yyxx_btn_confirm", "id"))
+        btnConfirm.text = ResUtils.getResString(context, "yyxx_tv_confirm")
         btnConfirm.setOnClickListener {
             callModifyPwd()
         }

+ 25 - 25
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/floatball/FloatCenterService.kt

@@ -8,7 +8,7 @@ import android.os.IBinder
 import android.text.TextUtils
 import android.widget.ImageView
 import cn.yyxx.eyuancomm.core.entity.FloatFeature
-import cn.yyxx.eyuancomm.core.impl.GameSdkImpl
+import cn.yyxx.eyuancomm.core.EYuanGameSdk
 import cn.yyxx.eyuancomm.core.impl.center.HybridFeatureContainer
 import cn.yyxx.eyuancomm.core.impl.center.MemberCenterContainer
 import cn.yyxx.eyuancomm.core.utils.LocalCacheUtils
@@ -31,29 +31,29 @@ class FloatCenterService : Service() {
             if (isHide) {
                 ballView.alpha = 0.8f
                 if (isLeftLocation) {
-                    if (TextUtils.isEmpty(GameSdkImpl.initBean.floatCfg.floatIconLeftUrl)) {
+                    if (TextUtils.isEmpty(EYuanGameSdk.initBean.floatCfg.floatIconLeftUrl)) {
                         val resId = ResUtils.getResId(mActivity, "yyxx_float_logo_left_img", "drawable")
                         ballView.setBackgroundResource(resId)
                     } else {
-                        val name = Md5Utils.encodeByMD5(GameSdkImpl.initBean.floatCfg.floatIconLeftUrl)
+                        val name = Md5Utils.encodeByMD5(EYuanGameSdk.initBean.floatCfg.floatIconLeftUrl)
                         ballView.setImageBitmap(LocalCacheUtils.getLocalBitmap(mActivity!!, name))
                     }
                 } else {
-                    if (TextUtils.isEmpty(GameSdkImpl.initBean.floatCfg.floatIconRightUrl)) {
+                    if (TextUtils.isEmpty(EYuanGameSdk.initBean.floatCfg.floatIconRightUrl)) {
                         val resId = ResUtils.getResId(mActivity, "yyxx_float_logo_right_img", "drawable")
                         ballView.setBackgroundResource(resId)
                     } else {
-                        val name = Md5Utils.encodeByMD5(GameSdkImpl.initBean.floatCfg.floatIconRightUrl)
+                        val name = Md5Utils.encodeByMD5(EYuanGameSdk.initBean.floatCfg.floatIconRightUrl)
                         ballView.setImageBitmap(LocalCacheUtils.getLocalBitmap(mActivity!!, name))
                     }
                 }
             } else {
                 ballView.alpha = 1.0f
-                if (TextUtils.isEmpty(GameSdkImpl.initBean.floatCfg.floatIconUrl)) {
+                if (TextUtils.isEmpty(EYuanGameSdk.initBean.floatCfg.floatIconUrl)) {
                     val resId = ResUtils.getResId(mActivity, "yyxx_float_logo_img", "drawable")
                     ballView.setBackgroundResource(resId)
                 } else {
-                    val name = Md5Utils.encodeByMD5(GameSdkImpl.initBean.floatCfg.floatIconUrl)
+                    val name = Md5Utils.encodeByMD5(EYuanGameSdk.initBean.floatCfg.floatIconUrl)
                     ballView.setImageBitmap(LocalCacheUtils.getLocalBitmap(mActivity!!, name))
                 }
             }
@@ -61,56 +61,56 @@ class FloatCenterService : Service() {
 
         override fun onInitMenuData(): MutableList<FloatingBallMenu.FloatingBallMenuItem> {
             val items = mutableListOf<FloatingBallMenu.FloatingBallMenuItem>()
-            if (GameSdkImpl.initBean.floatCfg.memberCfg.switch == 1) {
+            if (EYuanGameSdk.initBean.floatCfg.memberCfg.switch == 1) {
                 items.add(
                     FloatingBallMenu.FloatingBallMenuItem(
                         FloatFeature.FEATURE_MEMBER,
-                        GameSdkImpl.initBean.floatCfg.memberCfg.iconUrl,
+                        EYuanGameSdk.initBean.floatCfg.memberCfg.iconUrl,
                         ""
                     )
                 )
             }
-            if (GameSdkImpl.initBean.floatCfg.gifCfg.switch == 1 && !TextUtils.isEmpty(GameSdkImpl.initBean.floatCfg.gifCfg.url)) {
+            if (EYuanGameSdk.initBean.floatCfg.gifCfg.switch == 1 && !TextUtils.isEmpty(EYuanGameSdk.initBean.floatCfg.gifCfg.url)) {
                 items.add(
                     FloatingBallMenu.FloatingBallMenuItem(
                         FloatFeature.FEATURE_GIF,
-                        GameSdkImpl.initBean.floatCfg.gifCfg.iconUrl,
-                        GameSdkImpl.initBean.floatCfg.gifCfg.url
+                        EYuanGameSdk.initBean.floatCfg.gifCfg.iconUrl,
+                        EYuanGameSdk.initBean.floatCfg.gifCfg.url
                     )
                 )
             }
-            if (GameSdkImpl.initBean.floatCfg.gmCfg.switch == 1 && !TextUtils.isEmpty(GameSdkImpl.initBean.floatCfg.gmCfg.url)) {
+            if (EYuanGameSdk.initBean.floatCfg.gmCfg.switch == 1 && !TextUtils.isEmpty(EYuanGameSdk.initBean.floatCfg.gmCfg.url)) {
                 items.add(
                     FloatingBallMenu.FloatingBallMenuItem(
                         FloatFeature.FEATURE_GM,
-                        GameSdkImpl.initBean.floatCfg.gmCfg.iconUrl,
-                        GameSdkImpl.initBean.floatCfg.gmCfg.url
+                        EYuanGameSdk.initBean.floatCfg.gmCfg.iconUrl,
+                        EYuanGameSdk.initBean.floatCfg.gmCfg.url
                     )
                 )
             }
-            if (GameSdkImpl.initBean.floatCfg.chargeCfg.switch == 1 && !TextUtils.isEmpty(GameSdkImpl.initBean.floatCfg.chargeCfg.url)) {
+            if (EYuanGameSdk.initBean.floatCfg.chargeCfg.switch == 1 && !TextUtils.isEmpty(EYuanGameSdk.initBean.floatCfg.chargeCfg.url)) {
                 items.add(
                     FloatingBallMenu.FloatingBallMenuItem(
                         FloatFeature.FEATURE_CHARGE,
-                        GameSdkImpl.initBean.floatCfg.chargeCfg.iconUrl,
-                        GameSdkImpl.initBean.floatCfg.chargeCfg.url
+                        EYuanGameSdk.initBean.floatCfg.chargeCfg.iconUrl,
+                        EYuanGameSdk.initBean.floatCfg.chargeCfg.url
                     )
                 )
             }
-            if (GameSdkImpl.initBean.floatCfg.inviteCfg.switch == 1 && !TextUtils.isEmpty(GameSdkImpl.initBean.floatCfg.inviteCfg.url)) {
+            if (EYuanGameSdk.initBean.floatCfg.inviteCfg.switch == 1 && !TextUtils.isEmpty(EYuanGameSdk.initBean.floatCfg.inviteCfg.url)) {
                 items.add(
                     FloatingBallMenu.FloatingBallMenuItem(
                         FloatFeature.FEATURE_INVITE,
-                        GameSdkImpl.initBean.floatCfg.inviteCfg.iconUrl,
-                        GameSdkImpl.initBean.floatCfg.inviteCfg.url
+                        EYuanGameSdk.initBean.floatCfg.inviteCfg.iconUrl,
+                        EYuanGameSdk.initBean.floatCfg.inviteCfg.url
                     )
                 )
             }
-            if (GameSdkImpl.initBean.floatCfg.logoutCfg.switch == 1) {
+            if (EYuanGameSdk.initBean.floatCfg.logoutCfg.switch == 1) {
                 items.add(
                     FloatingBallMenu.FloatingBallMenuItem(
                         FloatFeature.FEATURE_LOGOUT,
-                        GameSdkImpl.initBean.floatCfg.logoutCfg.iconUrl,
+                        EYuanGameSdk.initBean.floatCfg.logoutCfg.iconUrl,
                         ""
                     )
                 )
@@ -121,7 +121,7 @@ class FloatCenterService : Service() {
         override fun onMenuItemClick(item: FloatingBallMenu.FloatingBallMenuItem, pos: Int) {
             when (item.type) {
                 FloatFeature.FEATURE_MEMBER -> MemberCenterContainer(mActivity!!).show()
-                FloatFeature.FEATURE_LOGOUT -> GameSdkImpl.floatBallLogoutCallback?.apply { this(0, "浮标切换账号") }
+                FloatFeature.FEATURE_LOGOUT -> EYuanGameSdk.floatBallLogoutCallback?.onResult(0, "浮标切换账号")
                 else -> HybridFeatureContainer(mActivity!!, item.url).show()
             }
         }
@@ -144,7 +144,7 @@ class FloatCenterService : Service() {
         }
 
         if (floatingBall == null) {
-            floatingBall = FloatingBall(mActivity!!, GameSdkImpl.isLandscape, callback)
+            floatingBall = FloatingBall(mActivity!!, EYuanGameSdk.isLandscape, callback)
         }
         floatingBall?.attach()
     }

+ 2 - 2
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/floatball/FloatCenterServiceManager.kt

@@ -9,7 +9,7 @@ import android.os.IBinder
 import android.text.TextUtils
 import cn.yyxx.eyuancomm.comm.entity.SdkLoginInfo
 import cn.yyxx.eyuancomm.comm.utils.Logger
-import cn.yyxx.eyuancomm.core.impl.GameSdkImpl
+import cn.yyxx.eyuancomm.core.EYuanGameSdk
 
 /**
  * @author #Suyghur.
@@ -48,7 +48,7 @@ class FloatCenterServiceManager private constructor() {
             Logger.e("浮标服务未初始化或发生异常")
             return
         }
-        if (!TextUtils.isEmpty(SdkLoginInfo.instance.userId) && GameSdkImpl.initBean.floatCfg.switch == 1) {
+        if (!TextUtils.isEmpty(SdkLoginInfo.instance.userId) && EYuanGameSdk.initBean.floatCfg.switch == 1) {
             mService?.attach()
         } else {
             detach()

+ 9 - 4
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/login/LoginActivity.kt

@@ -20,8 +20,8 @@ import cn.yyxx.eyuancomm.comm.utils.Logger
 import cn.yyxx.eyuancomm.core.entity.ClickType
 import cn.yyxx.eyuancomm.core.entity.LoginType
 import cn.yyxx.eyuancomm.core.entity.Session
-import cn.yyxx.eyuancomm.core.ext.countDownCoroutines
-import cn.yyxx.eyuancomm.core.impl.GameSdkImpl
+import cn.yyxx.eyuancomm.comm.ext.countDownCoroutines
+import cn.yyxx.eyuancomm.core.EYuanGameSdk
 import cn.yyxx.eyuancomm.core.impl.login.fragment.LauncherFragment
 import cn.yyxx.eyuancomm.core.impl.login.fragment.RegisterFragment
 import cn.yyxx.eyuancomm.core.utils.SessionUtils
@@ -227,12 +227,12 @@ class LoginActivity : FragmentActivity(), View.OnClickListener {
     }
 
     private fun initView() {
-        if (GameSdkImpl.isLandscape) {
+        if (EYuanGameSdk.isLandscape) {
             window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN)
         }
         setContentView(ResUtils.getResId(this, "yyxx_login", "layout"))
 
-        if (!GameSdkImpl.isLandscape) {
+        if (!EYuanGameSdk.isLandscape) {
             AndroidBug5497Workaround.assistActivity(this)
         }
 
@@ -242,8 +242,13 @@ class LoginActivity : FragmentActivity(), View.OnClickListener {
         loginContainer.visibility = View.VISIBLE
 
         rgSelector = findViewById(ResUtils.getResId(this, "yyxx_rg_selector", "id"))
+
         btnLauncher = findViewById(ResUtils.getResId(this, "yyxx_btn_launcher", "id"))
+        btnLauncher.text = ResUtils.getResString(this, "yyxx_login_tab_launcher")
+
         btnRegister = findViewById(ResUtils.getResId(this, "yyxx_btn_register", "id"))
+        btnRegister.text = ResUtils.getResString(this, "yyxx_login_tab_register")
+
         viewPager = findViewById(ResUtils.getResId(this, "yyxx_vp", "id"))
         pagerAdapter.setList(fragments)
         viewPager.adapter = pagerAdapter

+ 0 - 1
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/login/UserSignInImpl.kt

@@ -111,7 +111,6 @@ class UserSignInImpl constructor(val activity: LoginActivity, private val callba
         val task: Task<GoogleSignInAccount> = GoogleSignIn.getSignedInAccountFromIntent(data)
         try {
             val account = task.getResult(ApiException::class.java)
-            Logger.d("${account?.email}")
             try {
                 val jsonObject = JSONObject()
                 jsonObject.put("login_type", LoginType.TYPE_GOOGLE_LOGIN)

+ 10 - 7
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/login/fragment/LauncherFragment.kt

@@ -11,10 +11,10 @@ import androidx.fragment.app.Fragment
 import cn.yyxx.eyuancomm.core.entity.ClickType
 import cn.yyxx.eyuancomm.core.entity.LoginType
 import cn.yyxx.eyuancomm.core.entity.Session
-import cn.yyxx.eyuancomm.core.ext.filterAccount
-import cn.yyxx.eyuancomm.core.ext.filterPhone
-import cn.yyxx.eyuancomm.core.ext.filterPwd
-import cn.yyxx.eyuancomm.core.impl.GameSdkImpl
+import cn.yyxx.eyuancomm.comm.ext.filterAccount
+import cn.yyxx.eyuancomm.comm.ext.filterPhone
+import cn.yyxx.eyuancomm.comm.ext.filterPwd
+import cn.yyxx.eyuancomm.core.EYuanGameSdk
 import cn.yyxx.eyuancomm.core.impl.login.LoginActivity
 import cn.yyxx.eyuancomm.core.network.SdkRequest
 import cn.yyxx.eyuancomm.core.utils.SessionUtils
@@ -121,12 +121,15 @@ class LauncherFragment : Fragment(), View.OnClickListener {
         }
 
         tvForget = view.findViewById(ResUtils.getResId(requireActivity(), "yyxx_tv_forget", "id"))
+        tvForget.text = ResUtils.getResString(requireActivity(), "yyxx_tv_forget")
 
         btnLauncher = view.findViewById(ResUtils.getResId(requireActivity(), "yyxx_btn_launcher", "id"))
+        btnLauncher.text = ResUtils.getResString(requireActivity(), "yyxx_tv_launcher")
 
         ivCheck = view.findViewById(ResUtils.getResId(requireActivity(), "yyxx_iv_check", "id"))
         tvAgreement = view.findViewById(ResUtils.getResId(requireActivity(), "yyxx_tv_agreement", "id"))
-        if (GameSdkImpl.initBean.privacyCfg.switch == 0 || TextUtils.isEmpty(GameSdkImpl.initBean.privacyCfg.url)) {
+        tvAgreement.text = ResUtils.getResString(requireActivity(), "yyxx_tv_agreement")
+        if (EYuanGameSdk.initBean.privacyCfg.switch == 0 || TextUtils.isEmpty(EYuanGameSdk.initBean.privacyCfg.url)) {
             ivCheck.visibility = View.GONE
             tvAgreement.visibility = View.GONE
         } else {
@@ -295,7 +298,7 @@ class LauncherFragment : Fragment(), View.OnClickListener {
             dismiss()
             forgetPwdDialog = null
         }
-        forgetPwdDialog = ForgetPwdDialog(requireContext(), GameSdkImpl.isLandscape)
+        forgetPwdDialog = ForgetPwdDialog(requireContext(), EYuanGameSdk.isLandscape)
         forgetPwdDialog?.apply {
             loginImpl.hideLoginView()
             ivReturn.setOnClickListener {
@@ -328,7 +331,7 @@ class LauncherFragment : Fragment(), View.OnClickListener {
             dismiss()
             agreementDialog = null
         }
-        agreementDialog = AgreementDialog(requireContext(), GameSdkImpl.initBean.privacyCfg.url, GameSdkImpl.isLandscape)
+        agreementDialog = AgreementDialog(requireContext(), EYuanGameSdk.initBean.privacyCfg.url, EYuanGameSdk.isLandscape)
         agreementDialog?.apply {
             loginImpl.hideLoginView()
             ivReturn.setOnClickListener {

+ 7 - 5
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/login/fragment/RegisterFragment.kt

@@ -13,9 +13,9 @@ import android.widget.ImageView
 import android.widget.TextView
 import androidx.fragment.app.Fragment
 import cn.yyxx.eyuancomm.core.entity.ClickType
-import cn.yyxx.eyuancomm.core.ext.filterAccount
-import cn.yyxx.eyuancomm.core.ext.filterPwd
-import cn.yyxx.eyuancomm.core.impl.GameSdkImpl
+import cn.yyxx.eyuancomm.comm.ext.filterAccount
+import cn.yyxx.eyuancomm.comm.ext.filterPwd
+import cn.yyxx.eyuancomm.core.EYuanGameSdk
 import cn.yyxx.eyuancomm.core.impl.login.LoginActivity
 import cn.yyxx.eyuancomm.core.widget.EventEditText
 import cn.yyxx.eyuancomm.core.widget.dialog.AgreementDialog
@@ -94,10 +94,12 @@ class RegisterFragment : Fragment(), View.OnClickListener {
         }
 
         btnRegister = view.findViewById(ResUtils.getResId(requireActivity(), "yyxx_btn_register", "id"))
+        btnRegister.text = ResUtils.getResString(requireActivity(), "yyxx_tv_register")
 
         ivCheck = view.findViewById(ResUtils.getResId(requireActivity(), "yyxx_iv_check", "id"))
         tvAgreement = view.findViewById(ResUtils.getResId(requireActivity(), "yyxx_tv_agreement", "id"))
-        if (GameSdkImpl.initBean.privacyCfg.switch == 0 || TextUtils.isEmpty(GameSdkImpl.initBean.privacyCfg.url)) {
+        tvAgreement.text = ResUtils.getResString(requireActivity(), "yyxx_tv_agreement")
+        if (EYuanGameSdk.initBean.privacyCfg.switch == 0 || TextUtils.isEmpty(EYuanGameSdk.initBean.privacyCfg.url)) {
             ivCheck.visibility = View.GONE
             tvAgreement.visibility = View.GONE
         } else {
@@ -137,7 +139,7 @@ class RegisterFragment : Fragment(), View.OnClickListener {
             dismiss()
             agreementDialog = null
         }
-        agreementDialog = AgreementDialog(requireContext(), GameSdkImpl.initBean.privacyCfg.url, GameSdkImpl.isLandscape)
+        agreementDialog = AgreementDialog(requireContext(), EYuanGameSdk.initBean.privacyCfg.url, EYuanGameSdk.isLandscape)
         agreementDialog?.apply {
             loginImpl.hideLoginView()
             ivReturn.setOnClickListener {

+ 6 - 5
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/impl/share/ShareImpl.kt

@@ -3,6 +3,7 @@ package cn.yyxx.eyuancomm.core.impl.share
 import android.app.Activity
 import android.content.Intent
 import android.net.Uri
+import cn.yyxx.eyuancomm.comm.internal.ICallback
 import cn.yyxx.eyuancomm.comm.utils.Logger
 import com.facebook.CallbackManager
 import com.facebook.FacebookCallback
@@ -30,22 +31,22 @@ class ShareImpl private constructor() {
         }
     }
 
-    fun invokeShare2Fb(activity: Activity, line: String, tag: String, quote: String, callback: (Int, String) -> Unit) {
+    fun invokeShare2Fb(activity: Activity, line: String, tag: String, quote: String, callback: ICallback) {
         shareDialog = ShareDialog(activity)
         shareDialog?.registerCallback(fbCallback, object : FacebookCallback<Sharer.Result> {
             override fun onSuccess(result: Sharer.Result) {
                 Logger.d("facebook share onSuccess")
-                callback(0, "facebook share onSuccess")
+                callback.onResult(0, "facebook share onSuccess")
             }
 
             override fun onCancel() {
                 Logger.d("facebook share onCancel")
-                callback(-1, "facebook share onSuccess")
+                callback.onResult(-1, "facebook share onSuccess")
             }
 
             override fun onError(error: FacebookException) {
                 Logger.d("facebook share onError")
-                callback(-1, "facebook share onSuccess")
+                callback.onResult(-1, "facebook share onSuccess")
             }
         }, FACEBOOK_SHARE_RESULT_CODE)
 
@@ -58,6 +59,6 @@ class ShareImpl private constructor() {
     }
 
     fun onShareResult(requestCode: Int, resultCode: Int, intent: Intent?) {
-        fbCallback?.onActivityResult(requestCode, resultCode, intent)
+        fbCallback.onActivityResult(requestCode, resultCode, intent)
     }
 }

+ 0 - 14
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/internal/IOrder.kt

@@ -1,14 +0,0 @@
-package cn.yyxx.eyuancomm.core.internal
-
-import android.app.Activity
-import cn.yyxx.eyuancomm.comm.entity.SdkChargeInfo
-
-/**
- * @author #Suyghur.
- * Created on 2022/03/11
- */
-interface IOrder {
-    fun onConsume(activity: Activity, chargeInfo: SdkChargeInfo, token: String, cache: Boolean)
-
-    fun onFinish()
-}

+ 0 - 32
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/internal/ITrace.kt

@@ -1,32 +0,0 @@
-package cn.yyxx.eyuancomm.core.internal
-
-import android.app.Activity
-import android.app.Application
-import android.content.Context
-import cn.yyxx.eyuancomm.comm.entity.SdkChargeInfo
-import cn.yyxx.eyuancomm.core.entity.SdkEvent
-
-/**
- * @author #Suyghur.
- * Created on 2021/06/17
- */
-interface ITrace {
-
-    fun onInitialize(application: Application)
-
-    fun onLogin(context: Context)
-
-    fun onRegister(context: Context)
-
-    fun onCharge(context: Context, chargeInfo: SdkChargeInfo)
-
-    fun onCreate(activity: Activity)
-
-    fun onResume(activity: Activity)
-
-    fun onPause(activity: Activity)
-
-    fun onSdkEvent(context: Context, sdkEvent: SdkEvent)
-
-    fun onExtEvent(context: Context, sdkEvent: SdkEvent)
-}

+ 0 - 101
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/trace/TraceEventManager.kt

@@ -1,101 +0,0 @@
-//package cn.yyxx.eyuancomm.core.trace
-//
-//import android.app.Activity
-//import android.app.Application
-//import android.content.Context
-//import cn.yyxx.eyuancomm.comm.entity.SdkChargeInfo
-//import cn.yyxx.eyuancomm.core.entity.SdkEvent
-//import cn.yyxx.eyuancomm.core.internal.ITrace
-//import cn.yyxx.eyuancomm.core.trace.channel.TraceAdjustImpl
-//import cn.yyxx.eyuancomm.core.trace.channel.TraceFacebookImpl
-//import cn.yyxx.eyuancomm.core.trace.channel.TraceFirebaseImpl
-//
-///**
-// * @author #Suyghur.
-// * Created on 2021/06/17
-// */
-//class TraceEventManager private constructor() {
-//
-//    companion object {
-//        val instance: TraceEventManager by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
-//            TraceEventManager()
-//        }
-//    }
-//
-//    private val observers: MutableList<ITrace> = mutableListOf()
-//
-//    fun initialize(application: Application, callback: OnTraceIdRead) {
-//        observers.add(TraceAdjustImpl(object : TraceAdjustImpl.OnAdjustIdRead {
-//            override fun onRead(id: String) {
-//                callback.onAdjustIdRead(id)
-//            }
-//
-//        }))
-//        observers.add(TraceFirebaseImpl())
-//        observers.add(TraceFacebookImpl())
-//
-//        for (ob in observers) {
-//            ob.onInitialize(application)
-//        }
-//    }
-//
-//
-//    fun release() {
-//        if (!observers.isNullOrEmpty()) {
-//            observers.clear()
-//        }
-//    }
-//
-//
-//    fun login(context: Context) {
-//        for (ob in observers) {
-//            ob.onLogin(context)
-//        }
-//    }
-//
-//    fun register(context: Context) {
-//        for (ob in observers) {
-//            ob.onRegister(context)
-//        }
-//    }
-//
-//    fun charge(context: Context, chargeInfo: SdkChargeInfo) {
-//        for (ob in observers) {
-//            ob.onCharge(context, chargeInfo)
-//        }
-//    }
-//
-//    fun create(activity: Activity) {
-//        for (ob in observers) {
-//            ob.onCreate(activity)
-//        }
-//    }
-//
-//    fun resume(activity: Activity) {
-//        for (ob in observers) {
-//            ob.onResume(activity)
-//        }
-//    }
-//
-//    fun pause(activity: Activity) {
-//        for (ob in observers) {
-//            ob.onPause(activity)
-//        }
-//    }
-//
-//    fun sdkEvent(context: Context, sdkEvent: SdkEvent) {
-//        for (ob in observers) {
-//            ob.onSdkEvent(context, sdkEvent)
-//        }
-//    }
-//
-//    fun extEvent(context: Context, sdkEvent: SdkEvent) {
-//        for (ob in observers) {
-//            ob.onExtEvent(context, sdkEvent)
-//        }
-//    }
-//
-//    interface OnTraceIdRead {
-//        fun onAdjustIdRead(id: String)
-//    }
-//}

+ 0 - 264
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/trace/channel/TraceAdjustImpl.kt

@@ -1,264 +0,0 @@
-//package cn.yyxx.eyuancomm.core.trace.channel
-//
-//import android.app.Activity
-//import android.app.Application
-//import android.content.Context
-//import android.text.TextUtils
-//import cn.yyxx.eyuancomm.comm.entity.SdkChargeInfo
-//import cn.yyxx.eyuancomm.comm.entity.SdkLoginInfo
-//import cn.yyxx.eyuancomm.comm.utils.Logger
-//import cn.yyxx.eyuancomm.comm.utils.MMKVManager
-//import cn.yyxx.eyuancomm.comm.utils.ParamsUtils
-//import cn.yyxx.eyuancomm.core.entity.LoginType
-//import cn.yyxx.eyuancomm.core.entity.SdkEvent
-//import cn.yyxx.eyuancomm.core.internal.ITrace
-//import cn.yyxx.support.JsonUtils
-//import cn.yyxx.support.hawkeye.LogUtils
-//import com.adjust.sdk.Adjust
-//import com.adjust.sdk.AdjustConfig
-//import com.adjust.sdk.AdjustEvent
-//import com.adjust.sdk.LogLevel
-//import org.json.JSONObject
-//import java.io.BufferedReader
-//import java.io.InputStreamReader
-//
-///**
-// * @author #Suyghur.
-// * Created on 2021/06/17
-// */
-//class TraceAdjustImpl(val callback: OnAdjustIdRead) : ITrace {
-//
-//    private var isInitSuccess = false
-//    private var sdkConfig: JSONObject? = null
-//    private var extConfig: JSONObject? = null
-//
-//
-//    override fun onInitialize(application: Application) {
-//
-//        this.sdkConfig = getSdkLogJson(application)
-//        this.extConfig = getExtLogJson(application)
-//
-//        if (sdkConfig == null) {
-//            Logger.e("adjust log 初始化失败,读取sdk_log.json异常")
-//            return
-//        }
-//
-//        val appId = ParamsUtils.getAdjustAppId(application)
-//        if (TextUtils.isEmpty(appId)) {
-//            Logger.e("adjust log 初始化失败,app id为空")
-//            isInitSuccess = false
-//            return
-//        }
-//
-//        val environment = if (LogUtils.DEBUG) {
-//            AdjustConfig.ENVIRONMENT_SANDBOX
-//        } else {
-//            AdjustConfig.ENVIRONMENT_PRODUCTION
-//        }
-//
-//        val config = AdjustConfig(application, appId, environment, true)
-//        config.setLogLevel(LogLevel.VERBOSE)
-//        config.setOnAttributionChangedListener {
-//            callback.onRead(it.adid)
-//        }
-//        Adjust.onCreate(config)
-//        if (MMKVManager.instance.eventKV.decodeBool("adjust_activities")) {
-//            isInitSuccess = true
-//            return
-//        }
-//        sdkConfig?.apply {
-//            if (JsonUtils.hasJsonKey(this, "open_app")) {
-//                Adjust.trackEvent(AdjustEvent(this.getString("open_app")))
-//                Logger.d("adjust log open app success")
-//                MMKVManager.instance.eventKV.encode("adjust_activities", true)
-//                isInitSuccess = true
-//            }
-//        }
-//    }
-//
-//    override fun onLogin(context: Context) {
-//        if (!isInitSuccess) {
-//            Logger.e("adjust log failed , component initialize failed")
-//            return
-//        }
-//
-//        if (TextUtils.isEmpty(SdkLoginInfo.instance.userId)) {
-//            Logger.e("adjust log failed , user is null")
-//            return
-//        }
-//
-//        sdkConfig?.apply {
-//            when (SdkLoginInfo.instance.loginType) {
-//                LoginType.TYPE_GUEST_LOGIN -> {
-//                    if (JsonUtils.hasJsonKey(this, "login_success_quick")) {
-//                        Adjust.trackEvent(AdjustEvent(this.getString("login_success_quick")))
-//                        Logger.d("adjust log guest login success")
-//                    }
-//                }
-//                LoginType.TYPE_FACEBOOK_LOGIN -> {
-//                    if (JsonUtils.hasJsonKey(this, "login_success_fb")) {
-//                        Adjust.trackEvent(AdjustEvent(this.getString("login_success_fb")))
-//                        Logger.d("adjust log facebook login success")
-//                    }
-//                }
-//                LoginType.TYPE_GOOGLE_LOGIN -> {
-//                    if (JsonUtils.hasJsonKey(this, "login_success_google")) {
-//                        Adjust.trackEvent(AdjustEvent(this.getString("login_success_google")))
-//                        Logger.d("adjust log google login success")
-//                    }
-//                }
-//                LoginType.TYPE_ACCOUNT_LOGIN -> {
-//                    if (JsonUtils.hasJsonKey(this, "login_success_account")) {
-//                        Adjust.trackEvent(AdjustEvent(this.getString("login_success_account")))
-//                        Logger.d("adjust log account login success")
-//                    }
-//                }
-//            }
-//        }
-//    }
-//
-//    override fun onRegister(context: Context) {
-//        if (!isInitSuccess) {
-//            Logger.e("adjust log failed , component initialize failed")
-//            return
-//        }
-//
-//        if (TextUtils.isEmpty(SdkLoginInfo.instance.userId)) {
-//            Logger.e("adjust log failed , user is null")
-//            return
-//        }
-//
-//        sdkConfig?.apply {
-//            if (JsonUtils.hasJsonKey(this, "sign_up")) {
-//                Adjust.trackEvent(AdjustEvent(this.getString("sign_up")))
-//                Logger.d("adjust log register success")
-//            }
-//        }
-//    }
-//
-//    override fun onCharge(context: Context, chargeInfo: SdkChargeInfo) {
-//        if (!isInitSuccess) {
-//            Logger.e("adjust log failed , component initialize failed")
-//            return
-//        }
-//
-//        if (TextUtils.isEmpty(SdkLoginInfo.instance.userId)) {
-//            Logger.e("adjust log failed , user is null")
-//            return
-//        }
-//
-//        sdkConfig?.apply {
-//            if (!MMKVManager.instance.eventKV.decodeBool("adjust_first_purchase")) {
-//                if (JsonUtils.hasJsonKey(this, "first_purchase")) {
-//                    val event = AdjustEvent(this.getString("first_purchase"))
-//                    event.setRevenue(chargeInfo.amount.toDouble() / 100, "USD")
-//                    event.setOrderId(chargeInfo.orderId)
-//                    Adjust.trackEvent(event)
-//                    Logger.d("adjust log first charge success")
-//                    MMKVManager.instance.eventKV.encode("adjust_first_purchase", true)
-//                }
-//            }
-//
-//            if (JsonUtils.hasJsonKey(this, "ecommerce_purchase")) {
-//                val event = AdjustEvent(this.getString("ecommerce_purchase"))
-//                event.setRevenue(chargeInfo.amount.toDouble() / 100, "USD")
-//                event.setOrderId(chargeInfo.orderId)
-//                Adjust.trackEvent(event)
-//                Logger.d("adjust log charge success")
-//            }
-//        }
-//    }
-//
-//    override fun onCreate(activity: Activity) {
-//    }
-//
-//    override fun onResume(activity: Activity) {
-//        if (!isInitSuccess) {
-//            Logger.e("adjust log failed , component initialize failed")
-//            return
-//        }
-//        Adjust.onResume()
-//    }
-//
-//    override fun onPause(activity: Activity) {
-//        if (!isInitSuccess) {
-//            Logger.e("adjust log failed , component initialize failed")
-//            return
-//        }
-//        Adjust.onPause()
-//    }
-//
-//    override fun onSdkEvent(context: Context, sdkEvent: SdkEvent) {
-//        if (!isInitSuccess) {
-//            Logger.e("adjust log failed , component initialize failed")
-//            return
-//        }
-//
-//        sdkConfig?.apply {
-//            if (JsonUtils.hasJsonKey(this, sdkEvent.eventName)) {
-//                Adjust.trackEvent(AdjustEvent(this.getString(sdkEvent.eventName)))
-//                Logger.d("adjust log sdk event ${sdkEvent.eventName} success")
-//            }
-//        }
-//    }
-//
-//    override fun onExtEvent(context: Context, sdkEvent: SdkEvent) {
-//        if (!isInitSuccess) {
-//            Logger.e("adjust log failed , component initialize failed")
-//            return
-//        }
-//
-//        extConfig?.apply {
-//            if (JsonUtils.hasJsonKey(this, sdkEvent.eventName)) {
-//                Adjust.trackEvent(AdjustEvent(this.getString(sdkEvent.eventName)))
-//                Logger.d("adjust log ext event ${sdkEvent.eventName} success")
-//            }
-//        }
-//    }
-//
-//    private fun getSdkLogJson(context: Context): JSONObject? {
-//        val path = "yyxx_game/sdk_log.json"
-//        val sb = StringBuilder()
-//        try {
-//            val assetManager = context.assets
-//            BufferedReader(InputStreamReader(assetManager.open(path))).use {
-//                var line = ""
-//                while (true) {
-//                    line = it.readLine() ?: break
-//                    sb.append(line)
-//                }
-//            }
-//            if (!TextUtils.isEmpty(sb.toString())) {
-//                return JSONObject(sb.toString())
-//            }
-//        } catch (e: Exception) {
-//            e.printStackTrace()
-//        }
-//        return null
-//    }
-//
-//    private fun getExtLogJson(context: Context): JSONObject? {
-//        val path = "yyxx_game/ext_log.json"
-//        val sb = StringBuilder()
-//        try {
-//            val assetManager = context.assets
-//            BufferedReader(InputStreamReader(assetManager.open(path))).use {
-//                var line = ""
-//                while (true) {
-//                    line = it.readLine() ?: break
-//                    sb.append(line)
-//                }
-//            }
-//            if (!TextUtils.isEmpty(sb.toString())) {
-//                return JSONObject(sb.toString())
-//            }
-//        } catch (e: Exception) {
-//            e.printStackTrace()
-//        }
-//        return null
-//    }
-//
-//    interface OnAdjustIdRead {
-//        fun onRead(id: String)
-//    }
-//}

+ 0 - 168
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/trace/channel/TraceFacebookImpl.kt

@@ -1,168 +0,0 @@
-//package cn.yyxx.eyuancomm.core.trace.channel
-//
-//import android.app.Activity
-//import android.app.Application
-//import android.content.Context
-//import android.os.Bundle
-//import android.text.TextUtils
-//import cn.yyxx.eyuancomm.comm.entity.SdkChargeInfo
-//import cn.yyxx.eyuancomm.comm.entity.SdkLoginInfo
-//import cn.yyxx.eyuancomm.comm.utils.Logger
-//import cn.yyxx.eyuancomm.comm.utils.MMKVManager
-//import cn.yyxx.eyuancomm.core.entity.LoginType
-//import cn.yyxx.eyuancomm.core.entity.SdkEvent
-//import cn.yyxx.eyuancomm.core.internal.ITrace
-//import com.facebook.FacebookSdk
-//import com.facebook.LoggingBehavior
-//import com.facebook.appevents.AppEventsConstants
-//import com.facebook.appevents.AppEventsLogger
-//import java.math.BigDecimal
-//import java.util.*
-//
-///**
-// * @author #Suyghur.
-// * Created on 2021/07/06
-// */
-//class TraceFacebookImpl : ITrace {
-//
-//    private lateinit var fbLogger: AppEventsLogger
-//    private var isInitSuccess = false
-//
-//    override fun onInitialize(application: Application) {
-//
-//        FacebookSdk.setIsDebugEnabled(true)
-//        FacebookSdk.addLoggingBehavior(LoggingBehavior.APP_EVENTS)
-//
-//        fbLogger = AppEventsLogger.newLogger(application)
-//
-//        if (MMKVManager.instance.eventKV.decodeBool("facebook_activities")) {
-//            isInitSuccess = true
-//            return
-//        }
-//        //open_app
-//        Logger.d("facebook log open app success")
-//        fbLogger.logEvent("open_app")
-//        MMKVManager.instance.eventKV.encode("facebook_activities", true)
-//        isInitSuccess = true
-//    }
-//
-//    override fun onLogin(context: Context) {
-//        if (!isInitSuccess) {
-//            Logger.e("facebook log failed , component initialize failed")
-//            return
-//        }
-//
-//        if (TextUtils.isEmpty(SdkLoginInfo.instance.userId)) {
-//            Logger.e("facebook log failed , user is null")
-//            return
-//        }
-//
-//        when (SdkLoginInfo.instance.loginType) {
-//            LoginType.TYPE_GUEST_LOGIN -> {
-//                fbLogger.logEvent("login_success_quick")
-//                Logger.d("facebook log guest login success")
-//            }
-//            LoginType.TYPE_FACEBOOK_LOGIN -> {
-//                fbLogger.logEvent("login_success_fb")
-//                Logger.d("facebook log facebook login success")
-//            }
-//            LoginType.TYPE_GOOGLE_LOGIN -> {
-//                fbLogger.logEvent("login_success_google")
-//                Logger.d("facebook log google login success")
-//            }
-//            LoginType.TYPE_ACCOUNT_LOGIN -> {
-//                fbLogger.logEvent("login_success_account")
-//                Logger.d("facebook log account login success")
-//            }
-//        }
-//    }
-//
-//    override fun onRegister(context: Context) {
-//        if (!isInitSuccess) {
-//            Logger.e("facebook log failed , component initialize failed")
-//            return
-//        }
-//
-//        if (TextUtils.isEmpty(SdkLoginInfo.instance.userId)) {
-//            Logger.e("facebook log failed , user is null")
-//            return
-//        }
-//
-//        fbLogger.logEvent(AppEventsConstants.EVENT_NAME_COMPLETED_REGISTRATION)
-//        Logger.d("facebook log sign up success")
-//    }
-//
-//    override fun onCharge(context: Context, chargeInfo: SdkChargeInfo) {
-//        if (!isInitSuccess) {
-//            Logger.e("facebook log failed , component initialize failed")
-//            return
-//        }
-//
-//        if (TextUtils.isEmpty(SdkLoginInfo.instance.userId)) {
-//            Logger.e("facebook log failed , user is null")
-//            return
-//        }
-//        val params = Bundle()
-//        params.putDouble("price", chargeInfo.amount.toDouble() / 100)
-//        params.putString("order", chargeInfo.orderId)
-//
-//        if (!MMKVManager.instance.eventKV.decodeBool("facebook_first_purchase")) {
-//            fbLogger.logEvent("first_purchase", params)
-//            Logger.d("facebook log first charge success")
-//            MMKVManager.instance.eventKV.encode("facebook_first_purchase", true)
-//        }
-//
-//        fbLogger.logPurchase(BigDecimal.valueOf(chargeInfo.amount.toDouble() / 100), Currency.getInstance("USD"), params)
-//        Logger.d("facebook log charge success")
-//    }
-//
-//    override fun onCreate(activity: Activity) {
-//        if (!isInitSuccess) {
-//            Logger.e("facebook log failed , component initialize failed")
-//            return
-//        }
-//        AppEventsLogger.activateApp(activity.application)
-//    }
-//
-//    override fun onResume(activity: Activity) {
-//    }
-//
-//    override fun onPause(activity: Activity) {
-//    }
-//
-//    override fun onSdkEvent(context: Context, sdkEvent: SdkEvent) {
-//        if (!isInitSuccess) {
-//            Logger.e("facebook log failed , component initialize failed")
-//            return
-//        }
-//        fbLogger.logEvent(sdkEvent.eventName)
-//        Logger.d("facebook log sdk event ${sdkEvent.eventName} success")
-//    }
-//
-//    override fun onExtEvent(context: Context, sdkEvent: SdkEvent) {
-//        if (!isInitSuccess) {
-//            Logger.e("facebook log failed , component initialize failed")
-//            return
-//        }
-//        if (sdkEvent.standard) {
-//            val eventName = when (sdkEvent.fbAliasName) {
-//                "fb_mobile_tutorial_completion" -> AppEventsConstants.EVENT_NAME_COMPLETED_TUTORIAL
-//                "fb_mobile_level_achieved" -> AppEventsConstants.EVENT_NAME_ACHIEVED_LEVEL
-//                "fb_mobile_spent_credits" -> AppEventsConstants.EVENT_NAME_SPENT_CREDITS
-//                "fb_mobile_initiated_checkout" -> AppEventsConstants.EVENT_NAME_INITIATED_CHECKOUT
-//                "fb_mobile_add_to_cart" -> AppEventsConstants.EVENT_NAME_ADDED_TO_CART
-//                "fb_mobile_add_to_wishlist" -> AppEventsConstants.EVENT_NAME_ADDED_TO_WISHLIST
-//                "fb_mobile_add_payment_info" -> AppEventsConstants.EVENT_NAME_ADDED_PAYMENT_INFO
-//                "fb_mobile_achievement_unlocked" -> AppEventsConstants.EVENT_NAME_UNLOCKED_ACHIEVEMENT
-//                "fb_mobile_search" -> AppEventsConstants.EVENT_NAME_SEARCHED
-//                "fb_mobile_rate" -> AppEventsConstants.EVENT_NAME_RATED
-//                else -> ""
-//            }
-//            fbLogger.logEvent(eventName)
-//        } else {
-//            fbLogger.logEvent(sdkEvent.eventName)
-//        }
-//        Logger.d("facebook log ext event ${sdkEvent.eventName} success")
-//    }
-//}
-//

+ 0 - 140
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/trace/channel/TraceFirebaseImpl.kt

@@ -1,140 +0,0 @@
-//package cn.yyxx.eyuancomm.core.trace.channel
-//
-//import android.app.Activity
-//import android.app.Application
-//import android.content.Context
-//import android.text.TextUtils
-//import cn.yyxx.eyuancomm.comm.entity.SdkChargeInfo
-//import cn.yyxx.eyuancomm.comm.entity.SdkLoginInfo
-//import cn.yyxx.eyuancomm.comm.utils.Logger
-//import cn.yyxx.eyuancomm.comm.utils.MMKVManager
-//import cn.yyxx.eyuancomm.core.entity.LoginType
-//import cn.yyxx.eyuancomm.core.entity.SdkEvent
-//import cn.yyxx.eyuancomm.core.internal.ITrace
-//import com.google.firebase.analytics.FirebaseAnalytics
-//import com.google.firebase.analytics.ktx.analytics
-//import com.google.firebase.analytics.ktx.logEvent
-//import com.google.firebase.ktx.Firebase
-//
-///**
-// * @author #Suyghur.
-// * Created on 2021/06/17
-// */
-//class TraceFirebaseImpl : ITrace {
-//
-//    private var isInitSuccess = false
-//
-//    override fun onInitialize(application: Application) {
-//        if (MMKVManager.instance.eventKV.decodeBool("firebase_activities")) {
-//            isInitSuccess = true
-//            return
-//        }
-//        Firebase.analytics.logEvent("open_app", null)
-//        Logger.d("firebase log open app success")
-//        MMKVManager.instance.eventKV.encode("firebase_activities", true)
-//        isInitSuccess = true
-//    }
-//
-//    override fun onLogin(context: Context) {
-//        if (!isInitSuccess) {
-//            Logger.e("firebase log failed , component initialize failed")
-//            return
-//        }
-//
-//        if (TextUtils.isEmpty(SdkLoginInfo.instance.userId)) {
-//            Logger.e("firebase log failed , user is null")
-//            return
-//        }
-//
-//        when (SdkLoginInfo.instance.loginType) {
-//            LoginType.TYPE_GUEST_LOGIN -> {
-//                Firebase.analytics.logEvent("login_success_quick", null)
-//                Logger.d("firebase log guest login success")
-//            }
-//            LoginType.TYPE_FACEBOOK_LOGIN -> {
-//                Firebase.analytics.logEvent("login_success_fb", null)
-//                Logger.d("firebase log facebook login success")
-//            }
-//            LoginType.TYPE_GOOGLE_LOGIN -> {
-//                Firebase.analytics.logEvent("login_success_google", null)
-//                Logger.d("firebase log google login success")
-//            }
-//            LoginType.TYPE_ACCOUNT_LOGIN -> {
-//                Firebase.analytics.logEvent("login_success_account", null)
-//                Logger.d("firebase log account login success")
-//            }
-//        }
-//    }
-//
-//    override fun onRegister(context: Context) {
-//        if (!isInitSuccess) {
-//            Logger.e("firebase log failed , component initialize failed")
-//            return
-//        }
-//
-//        if (TextUtils.isEmpty(SdkLoginInfo.instance.userId)) {
-//            Logger.e("firebase log failed , user is null")
-//            return
-//        }
-//
-//        Firebase.analytics.logEvent("sign_up", null)
-//        Logger.d("firebase log sign up success")
-//    }
-//
-//    override fun onCharge(context: Context, chargeInfo: SdkChargeInfo) {
-//        if (!isInitSuccess) {
-//            Logger.e("firebase log failed , component initialize failed")
-//            return
-//        }
-//
-//        if (TextUtils.isEmpty(SdkLoginInfo.instance.userId)) {
-//            Logger.e("firebase log failed , user is null")
-//            return
-//        }
-//
-//        if (!MMKVManager.instance.eventKV.decodeBool("firebase_first_purchase")) {
-//            Firebase.analytics.logEvent("first_purchase") {
-//                param(FirebaseAnalytics.Param.PRICE, (chargeInfo.amount.toDouble() / 100).toString())
-//                param("order_id", chargeInfo.orderId)
-//            }
-//            Logger.d("firebase log first charge success")
-//            MMKVManager.instance.eventKV.encode("firebase_first_purchase", true)
-//        }
-//
-//        Firebase.analytics.logEvent("ecommerce_purchase") {
-//            param(FirebaseAnalytics.Param.PRICE, (chargeInfo.amount.toDouble() / 100).toString())
-//            param("order_id", chargeInfo.orderId)
-//        }
-//        Logger.d("firebase log charge success")
-//
-//    }
-//
-//    override fun onCreate(activity: Activity) {
-//    }
-//
-//    override fun onResume(activity: Activity) {
-//    }
-//
-//    override fun onPause(activity: Activity) {
-//    }
-//
-//
-//    override fun onSdkEvent(context: Context, sdkEvent: SdkEvent) {
-//        if (!isInitSuccess) {
-//            Logger.e("firebase log failed , component initialize failed")
-//            return
-//        }
-//        Firebase.analytics.logEvent(sdkEvent.eventName, null)
-//        Logger.d("firebase log sdk event ${sdkEvent.eventName} success")
-//    }
-//
-//    override fun onExtEvent(context: Context, sdkEvent: SdkEvent) {
-//        if (!isInitSuccess) {
-//            Logger.e("firebase log failed , component initialize failed")
-//            return
-//        }
-//        Firebase.analytics.logEvent(sdkEvent.eventName, null)
-//        Logger.d("firebase log ext event ${sdkEvent.eventName} success")
-//    }
-//
-//}

+ 5 - 0
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/widget/dialog/AgreementDialog.kt

@@ -11,6 +11,7 @@ import android.webkit.WebView
 import android.webkit.WebViewClient
 import android.widget.FrameLayout
 import android.widget.ImageView
+import android.widget.TextView
 import cn.yyxx.support.DensityUtils
 import cn.yyxx.support.ResUtils
 import cn.yyxx.support.device.DeviceInfoUtils
@@ -23,6 +24,7 @@ class AgreementDialog constructor(context: Context, url: String, private val isL
 
     lateinit var ivReturn: ImageView
         private set
+    private lateinit var tvTitle: TextView
 
     init {
         initView(context)
@@ -47,6 +49,9 @@ class AgreementDialog constructor(context: Context, url: String, private val isL
         attr.gravity = Gravity.CENTER
 
         ivReturn = findViewById(ResUtils.getResId(context, "yyxx_iv_return", "id"))
+
+        tvTitle = findViewById(ResUtils.getResId(context, "yyxx_tv_title", "id"))
+        tvTitle.text = ResUtils.getResString(context, "yyxx_tv_agreement_title")
     }
 
     private fun initWebView(url: String) {

+ 12 - 1
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/widget/dialog/AutoLoginDialog.kt

@@ -16,10 +16,12 @@ import cn.yyxx.support.ResUtils
  */
 class AutoLoginDialog(context: Context) : Dialog(context), DialogInterface.OnKeyListener {
 
+
+    private lateinit var tvWelcome: TextView
     lateinit var tvAccount: TextView
         private set
+    private lateinit var tvLauncher: TextView
     lateinit var tvNum: TextView
-
     lateinit var btnSwitch: Button
         private set
 
@@ -41,9 +43,18 @@ class AutoLoginDialog(context: Context) : Dialog(context), DialogInterface.OnKey
         attr.width = ViewGroup.LayoutParams.WRAP_CONTENT
         attr.gravity = Gravity.CENTER
 
+        tvWelcome = view.findViewById(ResUtils.getResId(context, "yyxx_tv_welcome", "id"))
+        tvWelcome.text = ResUtils.getResString(context, "yyxx_title_auto_login1")
+
         tvAccount = view.findViewById(ResUtils.getResId(context, "yyxx_iv_account", "id"))
+
+        tvLauncher = view.findViewById(ResUtils.getResId(context, "yyxx_tv_launcher", "id"))
+        tvLauncher.text = ResUtils.getResString(context, "yyxx_title_auto_login2")
+
         tvNum = view.findViewById(ResUtils.getResId(context, "yyxx_iv_num", "id"))
+
         btnSwitch = view.findViewById(ResUtils.getResId(context, "yyxx_btn_switch", "id"))
+        btnSwitch.text = ResUtils.getResString(context, "yyxx_tv_switch")
 
         setOnKeyListener(this)
     }

+ 9 - 11
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/widget/dialog/ChooseLoginDialog.kt

@@ -8,6 +8,8 @@ import android.view.LayoutInflater
 import android.view.View
 import android.view.Window
 import android.widget.ImageView
+import cn.yyxx.eyuancomm.comm.network.Host
+import cn.yyxx.eyuancomm.comm.utils.ParamsUtils
 import cn.yyxx.support.ResUtils
 
 /**
@@ -55,16 +57,12 @@ class ChooseLoginDialog(context: Context) : Dialog(context) {
         typeGuest = view.findViewById(ResUtils.getResId(context, "yyxx_iv_guest", "id"))
         typeAccount.setImageResource(ResUtils.getResId(context, "yyxx_account_login_img", "drawable"))
         typeGuest.setImageResource(ResUtils.getResId(context, "yyxx_guest_login_img", "drawable"))
-//        when (Host.ENV) {
-//            Host.Env.HK -> {
-//                typeAccount.setImageResource(ResUtils.getResId(context, "yyxx_account_login_img", "drawable"))
-//                typeGuest.setImageResource(ResUtils.getResId(context, "yyxx_guest_login_img", "drawable"))
-//            }
-//            Host.Env.VN -> {
-//                typeAccount.setImageResource(ResUtils.getResId(context, "yyxx_account_login_vn_img", "drawable"))
-//                typeGuest.setImageResource(ResUtils.getResId(context, "yyxx_guest_login_vn_img", "drawable"))
-//            }
-//        }
-
+        if (ParamsUtils.getLangEnv(context) == 2) {
+            typeAccount.setImageResource(ResUtils.getResId(context, "yyxx_account_login_vn_img", "drawable"))
+            typeGuest.setImageResource(ResUtils.getResId(context, "yyxx_guest_login_vn_img", "drawable"))
+        } else {
+            typeAccount.setImageResource(ResUtils.getResId(context, "yyxx_account_login_img", "drawable"))
+            typeGuest.setImageResource(ResUtils.getResId(context, "yyxx_guest_login_img", "drawable"))
+        }
     }
 }

+ 14 - 3
module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuancomm/core/widget/dialog/ForgetPwdDialog.kt

@@ -8,7 +8,7 @@ import android.view.*
 import android.widget.*
 import androidx.viewpager.widget.PagerAdapter
 import androidx.viewpager.widget.ViewPager
-import cn.yyxx.eyuancomm.core.impl.GameSdkImpl
+import cn.yyxx.eyuancomm.core.EYuanGameSdk
 import cn.yyxx.eyuancomm.core.widget.EventEditText
 import cn.yyxx.eyuancomm.core.widget.NoScrollViewPager
 import cn.yyxx.support.DensityUtils
@@ -29,6 +29,7 @@ class ForgetPwdDialog(context: Context, private val isLandscape: Boolean) : Dial
     private lateinit var phoneContainer: View
     private lateinit var emailContainer: View
 
+    private lateinit var tvTitle: TextView
     lateinit var ivReturn: ImageView
     lateinit var eetPhoneAccount: EventEditText
         private set
@@ -81,9 +82,15 @@ class ForgetPwdDialog(context: Context, private val isLandscape: Boolean) : Dial
 
         viewPager = view.findViewById(ResUtils.getResId(context, "yyxx_vp", "id"))
         rgSelector = view.findViewById(ResUtils.getResId(context, "yyxx_rg_selector", "id"))
+
         btnPhone = view.findViewById(ResUtils.getResId(context, "yyxx_btn_phone", "id"))
+        btnPhone.text = ResUtils.getResString(context, "yyxx_forget_pwd_tab_phone")
+
         btnEmail = view.findViewById(ResUtils.getResId(context, "yyxx_btn_email", "id"))
+        btnEmail.text = ResUtils.getResString(context, "yyxx_forget_pwd_tab_email")
 
+        tvTitle = view.findViewById(ResUtils.getResId(context, "yyxx_tv_title", "id"))
+        tvTitle.text = ResUtils.getResString(context, "yyxx_tv_forget_pwd_title")
 
         ivReturn = view.findViewById(ResUtils.getResId(context, "yyxx_iv_return", "id"))
         ivReturn.setOnClickListener {
@@ -101,6 +108,8 @@ class ForgetPwdDialog(context: Context, private val isLandscape: Boolean) : Dial
         eetPhoneAccount.editText.setHint(ResUtils.getResId(context, "yyxx_hint_account", "string"))
 
         tvArea = phoneContainer.findViewById(ResUtils.getResId(context, "yyxx_tv_area", "id"))
+        tvArea.text = ResUtils.getResString(context, "yyxx_tv_area_code")
+
         ivArrow = phoneContainer.findViewById(ResUtils.getResId(context, "yyxx_iv_arrow", "id"))
         ivArrow.setOnClickListener {
             changeAreaList()
@@ -115,6 +124,7 @@ class ForgetPwdDialog(context: Context, private val isLandscape: Boolean) : Dial
         svAreaList = phoneContainer.findViewById(ResUtils.getResId(context, "yyxx_sv_area_list", "id"))
 
         btnPhoneConfirm = phoneContainer.findViewById(ResUtils.getResId(context, "yyxx_btn_confirm", "id"))
+        btnPhoneConfirm.text = ResUtils.getResString(context, "yyxx_tv_confirm")
         autoFillAreaList(context)
 
         emailContainer = View.inflate(context, ResUtils.getResId(context, "yyxx_forget_pwd_email_container", "layout"), null)
@@ -130,6 +140,7 @@ class ForgetPwdDialog(context: Context, private val isLandscape: Boolean) : Dial
         eetEmail.editText.setHint(ResUtils.getResId(context, "yyxx_hint_email", "string"))
 
         btnEmailConfirm = emailContainer.findViewById(ResUtils.getResId(context, "yyxx_btn_confirm", "id"))
+        btnEmailConfirm.text = ResUtils.getResString(context, "yyxx_tv_confirm")
 
         val views = mutableListOf(
             phoneContainer,
@@ -170,7 +181,7 @@ class ForgetPwdDialog(context: Context, private val isLandscape: Boolean) : Dial
     }
 
     private fun autoFillAreaList(context: Context) {
-        if (GameSdkImpl.initBean.areaCodeList.isNullOrEmpty()) {
+        if (EYuanGameSdk.initBean.areaCodeList.isNullOrEmpty()) {
             //默认4个地区
             areaCodeList.add("86")
             //香港
@@ -180,7 +191,7 @@ class ForgetPwdDialog(context: Context, private val isLandscape: Boolean) : Dial
             //台湾
             areaCodeList.add("886")
         } else {
-            GameSdkImpl.initBean.areaCodeList.forEach {
+            EYuanGameSdk.initBean.areaCodeList.forEach {
                 areaCodeList.add(it)
             }
         }

+ 3 - 3
module_eyuan/library_eyuan/src/main/res/layout/yyxx_account_list_item.xml

@@ -11,7 +11,7 @@
         android:layout_height="14dp"
         android:layout_marginStart="15dp"
         android:layout_marginLeft="15dp"
-        android:background="@drawable/yyxx_account_img" />
+        android:src="@drawable/yyxx_account_img" />
 
     <TextView
         android:id="@+id/yyxx_tv_name"
@@ -21,7 +21,7 @@
         android:layout_marginLeft="10dp"
         android:layout_weight="1"
         android:gravity="center"
-        android:text="账号"
+        android:text=""
         android:textColor="@color/yyxx_color_gray"
         android:textSize="14sp" />
 
@@ -30,6 +30,6 @@
         android:layout_width="14dp"
         android:layout_height="14dp"
         android:layout_marginRight="15dp"
-        android:background="@drawable/yyxx_clear_img" />
+        android:src="@drawable/yyxx_clear_img" />
 
 </LinearLayout>

+ 1 - 1
module_eyuan/library_eyuan/src/main/res/layout/yyxx_agreement_dialog.xml

@@ -18,10 +18,10 @@
             android:src="@drawable/yyxx_return_img" />
 
         <TextView
+            android:id="@+id/yyxx_tv_title"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center"
-            android:text="@string/yyxx_tv_agreement_title"
             android:textColor="@color/yyxx_color_green_blue"
             android:textSize="20sp"
             android:textStyle="bold" />

+ 0 - 2
module_eyuan/library_eyuan/src/main/res/layout/yyxx_area_list_item.xml

@@ -13,8 +13,6 @@
         android:layout_marginStart="10dp"
         android:layout_marginEnd="10dp"
         android:gravity="center"
-        android:text="区号111"
         android:textColor="@color/yyxx_color_white"
         android:textSize="12sp" />
-
 </LinearLayout>

+ 3 - 3
module_eyuan/library_eyuan/src/main/res/layout/yyxx_auto_login_dialog.xml

@@ -18,7 +18,7 @@
             android:id="@+id/yyxx_tv_welcome"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:text="@string/yyxx_title_auto_login1"
+            android:text="欢迎,"
             android:textColor="@color/yyxx_color_gray_50"
             android:textSize="14sp"
             android:textStyle="bold" />
@@ -44,7 +44,7 @@
             android:id="@+id/yyxx_tv_launcher"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:text="@string/yyxx_title_auto_login2"
+            android:text="登录中,请稍后..."
             android:textColor="@color/yyxx_color_gray_50"
             android:textSize="14sp"
             android:textStyle="bold" />
@@ -68,7 +68,7 @@
         android:layout_gravity="center_horizontal"
         android:layout_marginTop="20dp"
         android:background="@drawable/yyxx_btn_green_blue_bg"
-        android:text="@string/yyxx_tv_switch"
+        android:text="切换账号"
         android:textColor="@color/yyxx_color_white"
         android:textSize="12sp"
         android:textStyle="bold" />

+ 4 - 3
module_eyuan/library_eyuan/src/main/res/layout/yyxx_forget_pwd_dialog.xml

@@ -21,10 +21,11 @@
             android:src="@drawable/yyxx_return_img" />
 
         <TextView
+            android:id="@+id/yyxx_tv_title"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center"
-            android:text="@string/yyxx_tv_forget_pwd_title"
+            android:text="忘记密码"
             android:textColor="@color/yyxx_color_green_blue"
             android:textSize="20sp"
             android:textStyle="bold" />
@@ -48,7 +49,7 @@
             android:button="@null"
             android:checked="true"
             android:gravity="center"
-            android:text="@string/yyxx_forget_pwd_tab_phone"
+            android:text="通过手机号码找回"
             android:textColor="@drawable/yyxx_txt_selector_bg"
             android:textSize="14sp" />
 
@@ -60,7 +61,7 @@
             android:background="@drawable/yyxx_forget_tab_selector_bg"
             android:button="@null"
             android:gravity="center"
-            android:text="@string/yyxx_forget_pwd_tab_email"
+            android:text="通过邮箱找回"
             android:textColor="@drawable/yyxx_txt_selector_bg"
             android:textSize="14sp" />
     </RadioGroup>

+ 1 - 1
module_eyuan/library_eyuan/src/main/res/layout/yyxx_forget_pwd_email_container.xml

@@ -24,7 +24,7 @@
         android:layout_height="35dp"
         android:layout_marginTop="30dp"
         android:background="@drawable/yyxx_btn_green_blue_bg"
-        android:text="@string/yyxx_tv_confirm"
+        android:text="确认"
         android:textColor="@color/yyxx_color_white"
         android:textSize="16sp" />
 </LinearLayout>

+ 2 - 2
module_eyuan/library_eyuan/src/main/res/layout/yyxx_forget_pwd_phone_container.xml

@@ -32,7 +32,7 @@
                 android:layout_height="35dp"
                 android:background="@drawable/yyxx_area_list_left_bg"
                 android:gravity="center"
-                android:text="@string/yyxx_tv_area_code"
+                android:text="区号"
                 android:textColor="@color/yyxx_color_white"
                 android:textSize="12sp" />
 
@@ -70,7 +70,7 @@
         android:layout_below="@id/yyxx_ll_group"
         android:layout_marginTop="20dp"
         android:background="@drawable/yyxx_btn_green_blue_bg"
-        android:text="@string/yyxx_tv_confirm"
+        android:text="确认"
         android:textColor="@color/yyxx_color_white"
         android:textSize="16sp" />
 

+ 2 - 2
module_eyuan/library_eyuan/src/main/res/layout/yyxx_login.xml

@@ -33,7 +33,7 @@
                 android:button="@null"
                 android:checked="true"
                 android:gravity="center"
-                android:text="@string/yyxx_login_tab_launcher"
+                android:text="登录"
                 android:textColor="@drawable/yyxx_txt_selector_bg"
                 android:textSize="14sp" />
 
@@ -45,7 +45,7 @@
                 android:background="@drawable/yyxx_btn_right_selector_bg"
                 android:button="@null"
                 android:gravity="center"
-                android:text="@string/yyxx_login_tab_register"
+                android:text="注册"
                 android:textColor="@drawable/yyxx_txt_selector_bg"
                 android:textSize="14sp" />
         </RadioGroup>

+ 3 - 3
module_eyuan/library_eyuan/src/main/res/layout/yyxx_login_launcher.xml

@@ -32,7 +32,7 @@
         android:layout_alignParentRight="true"
         android:layout_marginTop="5dp"
         android:autoLink="all"
-        android:text="@string/yyxx_tv_forget"
+        android:text="忘记密码"
         android:textColor="@color/yyxx_color_green_blue"
         android:textSize="12sp"
         android:textStyle="bold" />
@@ -45,7 +45,7 @@
         android:layout_below="@id/yyxx_tv_forget"
         android:layout_marginTop="10dp"
         android:background="@drawable/yyxx_btn_green_blue_bg"
-        android:text="@string/yyxx_tv_launcher"
+        android:text="登录"
         android:textColor="@color/yyxx_color_white"
         android:textSize="16sp" />
 
@@ -69,7 +69,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginLeft="5dp"
-            android:text="@string/yyxx_tv_agreement"
+            android:text="我已閲讀並同意《會員條款及管理規章》"
             android:textColor="@color/yyxx_color_gray"
             android:textSize="10sp"
             android:textStyle="bold" />

+ 2 - 2
module_eyuan/library_eyuan/src/main/res/layout/yyxx_login_register.xml

@@ -29,7 +29,7 @@
         android:layout_height="35dp"
         android:layout_marginTop="20dp"
         android:background="@drawable/yyxx_btn_green_blue_bg"
-        android:text="@string/yyxx_tv_register"
+        android:text="注册"
         android:textColor="@color/yyxx_color_white"
         android:textSize="16sp" />
 
@@ -52,7 +52,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginLeft="5dp"
-            android:text="@string/yyxx_tv_agreement"
+            android:text="我已閲讀並同意《會員條款及管理規章》"
             android:textColor="@color/yyxx_color_gray"
             android:textSize="10sp"
             android:textStyle="bold" />

+ 4 - 3
module_eyuan/library_eyuan/src/main/res/layout/yyxx_member_bind_account.xml

@@ -18,10 +18,11 @@
             android:src="@drawable/yyxx_return_img" />
 
         <TextView
+            android:id="@+id/yyxx_tv_title"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center"
-            android:text="@string/yyxx_tv_bind_account"
+            android:text="账号绑定"
             android:textColor="@color/yyxx_color_green_blue"
             android:textSize="20sp"
             android:textStyle="bold" />
@@ -56,7 +57,7 @@
             android:layout_height="wrap_content"
             android:layout_marginTop="10dp"
             android:gravity="center"
-            android:text="@string/yyxx_tv_bind_account_tips"
+            android:text="注:此處帳號為新建帳號,請不要輸入已經註冊過的帳號"
             android:textColor="@color/yyxx_color_red"
             android:textSize="10sp"
             android:textStyle="bold" />
@@ -68,7 +69,7 @@
             android:layout_height="35dp"
             android:layout_marginTop="10dp"
             android:background="@drawable/yyxx_btn_green_blue_bg"
-            android:text="@string/yyxx_tv_confirm"
+            android:text="确认"
             android:textColor="@color/yyxx_color_white"
             android:textSize="16sp" />
     </LinearLayout>

+ 5 - 4
module_eyuan/library_eyuan/src/main/res/layout/yyxx_member_bind_email.xml

@@ -18,10 +18,11 @@
             android:src="@drawable/yyxx_return_img" />
 
         <TextView
+            android:id="@+id/yyxx_tv_title"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center"
-            android:text="@string/yyxx_tv_bind_email"
+            android:text="邮箱绑定"
             android:textColor="@color/yyxx_color_green_blue"
             android:textSize="20sp"
             android:textStyle="bold" />
@@ -48,7 +49,7 @@
                 android:id="@+id/yyxx_tv_tips1"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:text="@string/yyxx_iv_bind_email_tips"
+                android:text="此账号已绑定邮箱"
                 android:textColor="@color/yyxx_color_black_gray"
                 android:textSize="16sp"
                 android:textStyle="bold" />
@@ -93,7 +94,7 @@
                 android:layout_marginStart="10dp"
                 android:layout_weight="1"
                 android:background="@drawable/yyxx_btn_green_blue_bg"
-                android:text="@string/yyxx_tv_get_captcha"
+                android:text="获取验证码"
                 android:textColor="@color/yyxx_color_white"
                 android:textSize="12sp" />
         </LinearLayout>
@@ -105,7 +106,7 @@
             android:layout_height="35dp"
             android:layout_marginTop="30dp"
             android:background="@drawable/yyxx_btn_green_blue_bg"
-            android:text="@string/yyxx_tv_confirm"
+            android:text="确认"
             android:textColor="@color/yyxx_color_white"
             android:textSize="16sp"
             android:visibility="visible" />

+ 7 - 6
module_eyuan/library_eyuan/src/main/res/layout/yyxx_member_bind_phone.xml

@@ -18,10 +18,11 @@
             android:src="@drawable/yyxx_return_img" />
 
         <TextView
+            android:id="@+id/yyxx_tv_title"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center"
-            android:text="@string/yyxx_tv_bind_phone"
+            android:text="手机绑定"
             android:textColor="@color/yyxx_color_green_blue"
             android:textSize="20sp"
             android:textStyle="bold" />
@@ -49,7 +50,7 @@
                 android:id="@+id/yyxx_tv_tips1"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:text="@string/yyxx_iv_bind_phone_tips1"
+                android:text="此账号已绑定手机"
                 android:textColor="@color/yyxx_color_black_gray"
                 android:textSize="16sp"
                 android:textStyle="bold" />
@@ -58,7 +59,7 @@
                 android:id="@+id/yyxx_tv_tips2"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:text="@string/yyxx_iv_bind_phone_tips2"
+                android:text="绑定的手机账号为:"
                 android:textColor="@color/yyxx_color_black_gray"
                 android:textSize="16sp"
                 android:textStyle="bold" />
@@ -85,7 +86,7 @@
                     android:layout_height="35dp"
                     android:background="@drawable/yyxx_area_list_left_bg"
                     android:gravity="center"
-                    android:text="@string/yyxx_tv_area_code"
+                    android:text="区号"
                     android:textColor="@color/yyxx_color_white"
                     android:textSize="12sp" />
 
@@ -139,7 +140,7 @@
                 android:layout_marginStart="10dp"
                 android:layout_weight="1"
                 android:background="@drawable/yyxx_btn_green_blue_bg"
-                android:text="@string/yyxx_tv_get_captcha"
+                android:text="获取验证码"
                 android:textColor="@color/yyxx_color_white"
                 android:textSize="12sp" />
         </LinearLayout>
@@ -179,7 +180,7 @@
             android:layout_below="@id/yyxx_ll_group2"
             android:layout_marginTop="30dp"
             android:background="@drawable/yyxx_btn_green_blue_bg"
-            android:text="@string/yyxx_tv_confirm"
+            android:text="确认"
             android:textColor="@color/yyxx_color_white"
             android:textSize="16sp"
             android:visibility="gone" />

+ 7 - 6
module_eyuan/library_eyuan/src/main/res/layout/yyxx_member_center.xml

@@ -18,10 +18,11 @@
             android:src="@drawable/yyxx_return_img" />
 
         <TextView
+            android:id="@+id/yyxx_tv_title"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center"
-            android:text="@string/yyxx_tv_member_center_title"
+            android:text="会员中心"
             android:textColor="@color/yyxx_color_green_blue"
             android:textSize="20sp"
             android:textStyle="bold" />
@@ -60,7 +61,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:gravity="center"
-                android:text="@string/yyxx_login_type_guest"
+                android:text="快速登录"
                 android:textColor="@color/yyxx_color_black"
                 android:textSize="10sp" />
 
@@ -70,7 +71,7 @@
                 android:layout_height="20dp"
                 android:background="@drawable/yyxx_green_blue_panel_content_bg"
                 android:gravity="center"
-                android:text="@string/yyxx_tv_bind_account"
+                android:text="账号绑定"
                 android:textColor="@color/yyxx_color_white"
                 android:textSize="8sp" />
         </LinearLayout>
@@ -99,7 +100,7 @@
                 android:layout_height="20dp"
                 android:background="@drawable/yyxx_green_blue_panel_content_bg"
                 android:gravity="center"
-                android:text="@string/yyxx_tv_bind_phone"
+                android:text="手机绑定"
                 android:textColor="@color/yyxx_color_white"
                 android:textSize="8sp" />
         </LinearLayout>
@@ -128,7 +129,7 @@
                 android:layout_height="20dp"
                 android:background="@drawable/yyxx_green_blue_panel_content_bg"
                 android:gravity="center"
-                android:text="@string/yyxx_tv_bind_email"
+                android:text="绑定邮箱"
                 android:textColor="@color/yyxx_color_white"
                 android:textSize="8sp" />
         </LinearLayout>
@@ -157,7 +158,7 @@
                 android:layout_height="20dp"
                 android:background="@drawable/yyxx_green_blue_panel_content_bg"
                 android:gravity="center"
-                android:text="@string/yyxx_tv_modify_pwd"
+                android:text="修改密码"
                 android:textColor="@color/yyxx_color_white"
                 android:textSize="8sp" />
         </LinearLayout>

+ 3 - 2
module_eyuan/library_eyuan/src/main/res/layout/yyxx_member_modify_pwd.xml

@@ -18,10 +18,11 @@
             android:src="@drawable/yyxx_return_img" />
 
         <TextView
+            android:id="@+id/yyxx_tv_title"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center"
-            android:text="@string/yyxx_tv_modify_pwd"
+            android:text="修改密码"
             android:textColor="@color/yyxx_color_green_blue"
             android:textSize="20sp"
             android:textStyle="bold" />
@@ -56,7 +57,7 @@
             android:layout_height="35dp"
             android:layout_marginTop="10dp"
             android:background="@drawable/yyxx_btn_green_blue_bg"
-            android:text="@string/yyxx_tv_confirm"
+            android:text="确认"
             android:textColor="@color/yyxx_color_white"
             android:textSize="16sp" />
     </LinearLayout>

+ 5 - 0
module_eyuan/library_eyuan/src/main/res/values/yyxx_strings.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="facebook_app_id" translatable="false"></string>
+    <string name="fb_login_protocol_scheme" translatable="false"></string>
+</resources>

+ 0 - 13
module_eyuan/library_hk_language/proguard-rules.pro

@@ -127,19 +127,6 @@
 -keep class **JNI* {*;}
 
 
--keep class cn.yyxx.support.**{*;}
--keep class com.dolin.zap.**{*;}
--keep class cn.yyxx.eyuangame.base.entity.SdkEvent{public <fields>; public <methods>;}
--keep class cn.yyxx.eyuangame.base.entity.SdkChargeInfo{public <fields>; public <methods>;}
--keep class cn.yyxx.eyuangame.base.entity.SdkRoleInfo{public <fields>; public <methods>;}
--keep class cn.yyxx.eyuangame.base.internal.ICallback{public <fields>; public <methods>;}
--keep class cn.yyxx.eyuangame.base.internal.IInitialize{public <fields>; public <methods>;}
--keep class cn.yyxx.eyuangame.base.utils.Logger{public <fields>; public <methods>;}
--keep class cn.yyxx.eyuangame.base.utils.ParamsUtils{public <fields>; public <methods>;}
--keep class cn.yyxx.eyuangame.base.EYuanGame{public <fields>; public <methods>;}
--keep class cn.yyxx.eyuangame.base.EYuanGameApplication{public <fields>; public <methods>;}
--keep class cn.yyxx.eyuangame.Version{public <fields>; public <methods>;}
-
 # firebase
 -keepattributes SourceFile,LineNumberTable        # Keep file names and line numbers.
 -keep public class * extends java.lang.Exception  # Optional: Keep custom exceptions.

+ 2 - 2
module_eyuan/library_hk_language/publish.gradle

@@ -3,8 +3,8 @@ apply plugin: 'signing'
 
 ext {
     PUBLISH_GROUP_ID = 'io.github.yyxxgame.sdk'
-    PUBLISH_ARTIFACT_ID = 'eyuangame-component-lang-hk'
-    PUBLISH_VERSION = '1.0.2'
+    PUBLISH_ARTIFACT_ID = 'eyuancomm-lang-hk'
+    PUBLISH_VERSION = '1.0.0-rc4'
 }
 
 Properties properties = new Properties()

+ 0 - 3
module_eyuan/library_hk_language/src/main/res/values/yyxx_strings.xml

@@ -84,7 +84,4 @@
     <string name="yyxx_charge_tv_error">支付服務異常,請稍後重試</string>
     <string name="yyxx_network_tv_error">出現網絡連接錯誤,請稍後重試</string>
     <string name="yyxx_charge_loading_tips">正在獲取訂單信息,請稍候…</string>
-
-    <string name="facebook_app_id" translatable="false"></string>
-    <string name="fb_login_protocol_scheme" translatable="false"></string>
 </resources>

+ 2 - 2
module_eyuan/library_vn_language/publish.gradle

@@ -3,8 +3,8 @@ apply plugin: 'signing'
 
 ext {
     PUBLISH_GROUP_ID = 'io.github.yyxxgame.sdk'
-    PUBLISH_ARTIFACT_ID = 'eyuangame-component-lang-vn'
-    PUBLISH_VERSION = '1.0.2'
+    PUBLISH_ARTIFACT_ID = 'eyuancomm-lang-vn'
+    PUBLISH_VERSION = '1.0.0-rc4'
 }
 
 Properties properties = new Properties()

+ 0 - 2
module_eyuan/library_vn_language/src/main/res/values/yyxx_strings.xml

@@ -86,6 +86,4 @@
     <string name="yyxx_charge_tv_error">Lỗi dịch vụ thanh toán, vui lòng thử lại sau</string>
     <string name="yyxx_network_tv_error">Lỗi mạng, vui lòng thử lại sau</string>
     <string name="yyxx_charge_loading_tips">Đang nhận thông tin đơn hàng, vui lòng thử lại sau…</string>
-    <string name="facebook_app_id" translatable="false"></string>
-    <string name="fb_login_protocol_scheme" translatable="false"></string>
 </resources>

+ 3 - 3
settings.gradle

@@ -8,8 +8,8 @@ include ':library_impl'
 // 渠道库
 include ':channel_registry:channel_oppo'
 include ':channel_registry:channel_vivo'
-include ':channel_registry:channel_huawei'
-//include ':channel_registry:channel_huawei2'
+//include ':channel_registry:channel_huawei'
+include ':channel_registry:channel_huawei2'
 
 // 组件
 include ':component:google-auth:play-services-auth'
@@ -27,6 +27,6 @@ include ':component:facebook-auth:facebook-login'
 // 自有sdk
 include ':module_eyuan:library_eyuan'
 include ':module_eyuan:library_hk_language'
-//include ':module_eyuan:library_vn_language'
+include ':module_eyuan:library_vn_language'
 
 

BIN
zkeystore/tscq_yyxx.keystore