supersdk

文档中心

文档中心

下载文档

Configuration module


Get all key-value values in the bcore_config.json file and customized the key-value values in the configuration module.

If the key values in the configuration module conflicts with the bcore_config.json file, the value in the configuration module shall prevail.

Get Youzu GameId (optional)

Interface Description: Get the gameID assigned by Yoozoo, normally it consist of 2-3 digits of the integer number. Youzu gameID 游族gameID

Interface invoke:

//获取游族gameId,其他值获取方式与此类似
Map<String, String> params = new HashMap<String, String>();
params.put(BCoreConst.config.KEY, BCoreConst.config.KEY_YZ_GAME_ID);//传入key-value值,key为内部定义识别的标识,value为需要获取的某个值,这里是yz_game_id。
String yzGameId = SuperSDK.invokeString(BCoreConst.config.MODULE_NAME, BCoreConst.config.FUNC_GET_VALUE, params);
Log.d(TAG, "yzGameId="+yzGameId);

Log printing:

yzGameId=94

Get extended parameters (optional)

Interface description: Get extended parameters, There are 4 parameters of SuperSDK. Extended parameter of orginal package 1234 extended parameter of channel 1234 母包扩展参数1234 渠道扩展参数1234

1、get extended parameters 1

Interface invoke:

//获取扩展参数1,其他值获取方式与此类似
Map<String, String> params = new HashMap<String, String>();
params.put(BCoreConst.config.KEY, BCoreConst.config.KEY_EXTEND);//传入key-value值,key为内部定义识别的标识,value为需要获取的某个值,这里是extend。
String extend = SuperSDK.invokeString(BCoreConst.config.MODULE_NAME, BCoreConst.config.FUNC_GET_VALUE, params);
Log.d(TAG, "extend="+extend);

Log printing:

//母包
extend=2150|94|0
//渠道包
extend=扩展参数一

2、get extended parameters 2

Interface invoke:

//获取扩展参数2,其他值获取方式与此类似
Map<String, String> params = new HashMap<String, String>();
params.put(BCoreConst.config.KEY, BCoreConst.config.KEY_EXTEND2);//传入key-value值,key为内部定义识别的标识,value为需要获取的某个值,这里是extend2。
String extend = SuperSDK.invokeString(BCoreConst.config.MODULE_NAME, BCoreConst.config.FUNC_GET_VALUE, params);
Log.d(TAG, "extend="+extend);

Log printing:

//母包
extend=extend2
//渠道包
extend=扩展参数二

3、get extended parameters 3

Interface invoke:

//获取扩展参数3,其他值获取方式与此类似
Map<String, String> params = new HashMap<String, String>();
params.put(BCoreConst.config.KEY, BCoreConst.config.KEY_EXTEND3);//传入key-value值,key为内部定义识别的标识,value为需要获取的某个值,这里是extend3。
String extend = SuperSDK.invokeString(BCoreConst.config.MODULE_NAME, BCoreConst.config.FUNC_GET_VALUE, params);
Log.d(TAG, "extend="+extend);

Log printing:

//母包
extend=extend3
//渠道包
extend=扩展参数三

4、get extended parameters 4

Interface invoke:

//获取扩展参数4,其他值获取方式与此类似
Map<String, String> params = new HashMap<String, String>();
params.put(BCoreConst.config.KEY, BCoreConst.config.KEY_EXTEND4);//传入key-value值,key为内部定义识别的标识,value为需要获取的某个值,这里是extend4。
String extend = SuperSDK.invokeString(BCoreConst.config.MODULE_NAME, BCoreConst.config.FUNC_GET_VALUE, params);
Log.d(TAG, "extend="+extend);

Log printing:

//母包
extend=extend4
//渠道包
extend=扩展参数四

5、get the package name

Interface description: “Get the original package name from the configuration file, you need to configure the package name in the basic parameter configuration, the player can not be modified by decompilation” Interface invoke: Interface invoke:

//获取游戏包名,其他值获取方式与此类似
Map<String, String> params = new HashMap<String, String>();
params.put(BCoreConst.config.KEY, "packagename");//传入key-value值,key为内部定义识别的标识,value为需要获取的某个值,这里是包名。
String packageName = SuperSDK.invokeString(BCoreConst.config.MODULE_NAME, BCoreConst.config.FUNC_GET_VALUE, params);
Log.d(TAG, "packageName="+packageName);

Log printing:

//母包
packageName=母包包名
//渠道包
packageName=渠道包包名

Appendix

Constant string Event string Description
BCoreConst.config.MODULE_NAME config Module name
BCoreConst.config.FUNC_GET_VALUE getValue The method of getting key-value under the configuration module
BCoreConst.config.KEY key Hold one of the following key values
BCoreConst.config.KEY_YZ_GAME_ID yz_game_id Youzu gameID, get the value of key=yz_game_id
BCoreConst.config.KEY_EXTEND extend Customize parameter 1, get the value of key=extend
BCoreConst.config.KEY_EXTEND2 extend2 Custom parameter 2, get the value of key=extend2
BCoreConst.config.KEY_EXTEND3 extend3 Custom parameter 3, get the value of key=extend3
BCoreConst.config.KEY_EXTEND4 extend4 Custom parameter 4, get the value of key=extend4