提交 b3ccc17a 作者: 刘添

更新 AndroidSDK对接文档.md

上级 a640fbee
# Android SDK 对接文档-v1.0
# Android SDK 对接文档-v1.0
......@@ -176,6 +176,32 @@ implementation 'com.zwwl.legend.sdk:legend:1.0.0'
GameService.getInstance().init(this,"1","")
```
在application中初始化
```
public class MyApp extends Application {
@Override
protected void attachBaseContext(Context base) {
GameApplicationService.getInstance().attachBaseContext(base);
super.attachBaseContext(base);
}
@Override
public void onCreate() {
super.onCreate();
GameApplicationService.getInstance().onCreate(this,1);
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
GameApplicationService.getInstance().onConfigurationChanged(this);
}
}
```
### 配置游戏game_id
在主工程AndroidManifest.xml清单文件中配置Meta参数,name值:game_id、value值:即平台游戏ID
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论