Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zw_game_sdk
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
CI / CD
CI / CD
流水线
日程表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
提交
问题看板
Open sidebar
zwwl
zw_game_sdk
Commits
1286dbad
提交
1286dbad
authored
4月 30, 2026
作者:
钱宇
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify:聚合SDK文档修改。
上级
0aaa5fe4
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
21 行增加
和
15 行删除
+21
-15
build.gradle.kts
聚合SDK/aggregation-android-sdk-demo/app/build.gradle.kts
+3
-2
MainActivity.kt
.../main/java/com/zwgame/test/gamecenterdemo/MainActivity.kt
+5
-4
MainJavaActivity.java
...java/com/zwgame/test/gamecenterdemo/MainJavaActivity.java
+5
-4
接入文档.md
聚合SDK/接入文档.md
+8
-5
没有找到文件。
聚合SDK/aggregation-android-sdk-demo/app/build.gradle.kts
浏览文件 @
1286dbad
plugi
ns {
plugi
ns {
...
@@ -79,5 +79,5 @@ dependencies {
...
@@ -79,5 +79,5 @@ dependencies {
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(libs.androidx.espresso.core)
implementation("com.zw.game.center:gameCenter:1.0.0.
4
")
implementation("com.zw.game.center:gameCenter:1.0.0.
3
")
}
}
\ No newline at end of file
聚合SDK/aggregation-android-sdk-demo/app/src/main/java/com/zwgame/test/gamecenterdemo/MainActivity.kt
浏览文件 @
1286dbad
packa
ge
com.zwgame.test.gamecenterdemo
packa
ge
com.zwgame.test.gamecenterdemo
...
@@ -59,7 +59,8 @@ class MainActivity : AppCompatActivity() {
...
@@ -59,7 +59,8 @@ class MainActivity : AppCompatActivity() {
val
obj
=
JSONObject
(
result
)
val
obj
=
JSONObject
(
result
)
val
success
=
obj
.
optBoolean
(
"success"
)
val
success
=
obj
.
optBoolean
(
"success"
)
if
(
success
)
{
if
(
success
)
{
Log
.
i
(
TAG
,
"init 成功"
)
val
channelCode
=
obj
.
optString
(
"channelCode"
)
Log
.
i
(
TAG
,
"init 成功,当前渠道:$channelCode"
)
}
else
{
}
else
{
Log
.
w
(
TAG
,
"init 失败 errorMsg=${obj.optString("
errorMsg
")} errorCode=${obj.optInt("
errorCode
")}"
)
Log
.
w
(
TAG
,
"init 失败 errorMsg=${obj.optString("
errorMsg
")} errorCode=${obj.optInt("
errorCode
")}"
)
}
}
...
@@ -173,12 +174,12 @@ class MainActivity : AppCompatActivity() {
...
@@ -173,12 +174,12 @@ class MainActivity : AppCompatActivity() {
private
fun
onShowFloatClick
()
{
private
fun
onShowFloatClick
()
{
statusText
.
setText
(
R
.
string
.
status_show_float_clicked
)
statusText
.
setText
(
R
.
string
.
status_show_float_clicked
)
ZySdk
.
s
dkShow
Float
(
this
)
{
}
ZySdk
.
s
howHuawei
Float
(
this
)
{
}
}
}
private
fun
onHideFloatClick
()
{
private
fun
onHideFloatClick
()
{
statusText
.
setText
(
R
.
string
.
status_hide_float_clicked
)
statusText
.
setText
(
R
.
string
.
status_hide_float_clicked
)
ZySdk
.
sdkHide
Float
(
this
)
{
}
ZySdk
.
hideHuawei
Float
(
this
)
{
}
}
}
private
fun
onExitClick
()
=
guardBusy
{
private
fun
onExitClick
()
=
guardBusy
{
...
...
聚合SDK/aggregation-android-sdk-demo/app/src/main/java/com/zwgame/test/gamecenterdemo/MainJavaActivity.java
浏览文件 @
1286dbad
packa
ge
com
.
zwgame
.
test
.
gamecenterdemo
;
packa
ge
com
.
zwgame
.
test
.
gamecenterdemo
;
...
@@ -68,7 +68,8 @@ public class MainJavaActivity extends AppCompatActivity {
...
@@ -68,7 +68,8 @@ public class MainJavaActivity extends AppCompatActivity {
JSONObject
obj
=
new
JSONObject
(
result
);
JSONObject
obj
=
new
JSONObject
(
result
);
boolean
success
=
obj
.
optBoolean
(
"success"
);
boolean
success
=
obj
.
optBoolean
(
"success"
);
if
(
success
)
{
if
(
success
)
{
Log
.
i
(
TAG
,
"init 成功"
);
String
channelCode
=
obj
.
optString
(
"channelCode"
);
Log
.
i
(
TAG
,
"init 成功,当前渠道:"
+
channelCode
);
}
else
{
}
else
{
Log
.
w
(
TAG
,
"init 失败 errorMsg="
+
obj
.
optString
(
"errorMsg"
)
+
" errorCode="
+
obj
.
optInt
(
"errorCode"
));
Log
.
w
(
TAG
,
"init 失败 errorMsg="
+
obj
.
optString
(
"errorMsg"
)
+
" errorCode="
+
obj
.
optInt
(
"errorCode"
));
}
}
...
@@ -217,12 +218,12 @@ public class MainJavaActivity extends AppCompatActivity {
...
@@ -217,12 +218,12 @@ public class MainJavaActivity extends AppCompatActivity {
private
void
onShowFloatClick
()
{
private
void
onShowFloatClick
()
{
statusText
.
setText
(
R
.
string
.
status_show_float_clicked
);
statusText
.
setText
(
R
.
string
.
status_show_float_clicked
);
ZySdk
.
INSTANCE
.
s
dkShow
Float
(
this
,
(
Function1
<
String
,
Unit
>)
result
->
Unit
.
INSTANCE
);
ZySdk
.
INSTANCE
.
s
howHuawei
Float
(
this
,
(
Function1
<
String
,
Unit
>)
result
->
Unit
.
INSTANCE
);
}
}
private
void
onHideFloatClick
()
{
private
void
onHideFloatClick
()
{
statusText
.
setText
(
R
.
string
.
status_hide_float_clicked
);
statusText
.
setText
(
R
.
string
.
status_hide_float_clicked
);
ZySdk
.
INSTANCE
.
sdkHide
Float
(
this
,
(
Function1
<
String
,
Unit
>)
result
->
Unit
.
INSTANCE
);
ZySdk
.
INSTANCE
.
hideHuawei
Float
(
this
,
(
Function1
<
String
,
Unit
>)
result
->
Unit
.
INSTANCE
);
}
}
private
void
onExitClick
()
{
private
void
onExitClick
()
{
...
...
聚合SDK/接入文档.md
浏览文件 @
1286dbad
# Gam
e Center SDK 接入说明V1.0.0.0
# Gam
e Center SDK 接入说明V1.0.0.0
...
@@ -185,7 +185,8 @@ ZySdk.sdkInit(activity) { result ->
...
@@ -185,7 +185,8 @@ ZySdk.sdkInit(activity) { result ->
val
obj
=
JSONObject
(
result
)
val
obj
=
JSONObject
(
result
)
val
success
=
obj
.
optBoolean
(
"success"
)
val
success
=
obj
.
optBoolean
(
"success"
)
if
(
success
)
{
if
(
success
)
{
Log
.
i
(
TAG
,
"init 成功"
)
val
channelCode
=
obj
.
optString
(
"channelCode"
)
Log
.
i
(
TAG
,
"init 成功,当前渠道:$channelCode"
)
}
else
{
}
else
{
val
errorMsg
=
obj
.
optString
(
"errorMsg"
)
val
errorMsg
=
obj
.
optString
(
"errorMsg"
)
val
errorCode
=
obj
.
optInt
(
"errorCode"
)
val
errorCode
=
obj
.
optInt
(
"errorCode"
)
...
@@ -204,10 +205,12 @@ ZySdk.sdkInit(activity) { result ->
...
@@ -204,10 +205,12 @@ ZySdk.sdkInit(activity) { result ->
**回参**
**回参**
| 字段 | 类型 | 含义 |
| 字段 | 类型 | 含义 |
|:-----------
:|:-------:|:
--------:|
|:-----------
--:|:-------:|:----------------------------
--------:|
|
`success`
| Boolean | 是否成功 |
|
`success`
| Boolean | 是否成功 |
|
`errorMsg`
| String | 失败时的提示文案 |
|
`errorMsg`
| String | 失败时的提示文案 |
|
`errorCode`
| Int | 错误码 |
|
`errorCode`
| Int | 错误码 |
|
`msg`
| String | 提示文案 |
|
`channelCode`
| String | 渠道编码(oppo、vivo、xiaomi、huawei、honor等) |
**华为渠道错误码如下:**
**华为渠道错误码如下:**
...
@@ -538,13 +541,13 @@ ZySdk.sdkUpdate(this) { result ->
...
@@ -538,13 +541,13 @@ ZySdk.sdkUpdate(this) { result ->
显示浮窗
显示浮窗
```
kotlin
```
kotlin
ZySdk
.
s
dkShow
Float
(
this
)
{
result
->
ZySdk
.
s
howHuawei
Float
(
this
)
{
result
->
}
}
```
```
隐藏浮窗
隐藏浮窗
```
kotlin
```
kotlin
ZySdk
.
sdkHide
Float
(
this
)
{
result
->
ZySdk
.
hideHuawei
Float
(
this
)
{
result
->
}
}
```
```
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论