360SDK数据服务

2018-10-10 11:08 更新

1.基本数据服务接入


游戏只调用初始化接口,便可享受360数据大部分服务,如无特殊需求,下文可忽略



2.游戏自定义数据服务接入


使用QHStatDo来调用以下各个方法。


2.1 关卡统计API

开始关卡

// level:关卡名称
public static void startLevel(String level)

 

结束关卡

// level:关卡名称
public static void finishLevel(String level)

 

失败关卡

// level:关卡名称
public static void failLevel(String level, String reason)


2.2 任务统计API

开始任务

// task:任务名称
// type:任务类型
public static void startTask(String task, String type)

 

结束任务

// task:任务名称
public static void finishTask(String task)

 

失败任务

// task:任务名称
// reason:失败原因
public static void failTask(String task, String reason)

 

2.3 支付统计API

// cash:支付金额(游戏自定义,可以是分或元为单位,游戏依照实际需求来定)
// coin:购买金币数量
// source:支付方式(游戏自定义,给每个支付渠道定义的整型值)
public static void pay(int cash, int coin, int source)
 
// cash:支付金额(游戏自定义,可以是分或元为单位,游戏依照实际需求来定)
// cashType:支付货币类型(游戏自定义)
// coin:购买金币数量
// source:支付方式(游戏自定义,给每个支付渠道定义的整型值)
public static void pay(int cash, String cashType, int coin, int source)
 
// cash:支付金额(游戏自定义,可以是分或元为单位,游戏依照实际需求来定)
// coin:购买金币数量
// source:支付方式(游戏自定义,给每个支付渠道定义的整型值)
// level:关卡名称
// rank:玩家等级
public static void pay(int cash, int coin, int source, String level, String rank)
 
// cash:支付金额(游戏自定义,可以是分或元为单位,游戏依照实际需求来定)
// cashType:支付货币类型
// coin:购买金币数量
// source:支付方式(游戏自定义,给每个支付渠道定义的整型值)
// level:关卡名称
// rank:玩家等级
public static void pay(int cash, String cashType, int coin, int source, String level, String rank)
 
// cash:支付金额(游戏自定义,可以是分或元为单位,游戏依照实际需求来定)
// number:购买道具数量
// props:购买道具名称
// source:支付方式(游戏自定义,给每个支付渠道定义的整型值)
public static void pay(int cash, int number, String props,  int source)
 
// cash:支付金额(游戏自定义,可以是分或元为单位,游戏依照实际需求来定)
// cashType:支付货币类型
// number:购买道具数量
// props:购买道具名称
// source:支付方式(游戏自定义,给每个支付渠道定义的整型值)
public static void pay(int cash, String cashType, int number, String props,  int source)
 
// cash:支付金额(游戏自定义,可以是分或元为单位,游戏依照实际需求来定)
// number:购买道具数量
// props:购买道具名称
// source:支付方式(游戏自定义,给每个支付渠道定义的整型值)
// level:关卡名称
// rank:玩家等级
public static void pay(int cash, int number, String props, int source, String level, String rank)
 
// cash:支付金额(游戏自定义,可以是分或元为单位,游戏依照实际需求来定)
// cashType:支付货币类型
// number:购买道具数量
// props:购买道具名称
// source:支付方式(游戏自定义,给每个支付渠道定义的整型值)
// level:关卡名称
// rank:玩家等级
public static void pay(int cash, String cashType, int number, String props, int source, String level, String rank)

 

2.4 虚拟币购买物品统计API

// name:物品名称
// number:物品数量
// coin:消费的虚拟币数量
public static void buy(String name, int number, int coin)
 
// name:物品名称
// number:物品数量
// method:物品获取方式
public static void buy(String name, int number, String method)
 
// name:物品名称
// number:物品数量
// coinType: 虚拟币类型
// coin:消费的虚拟币数量
public static void buy(String name, int number, String coinType, int coin)
 
// name:物品名称
// number:物品数量
// coin:消费的虚拟币数量
// level:关卡名称
public static void buy(String name, int number, int coin, String level)
 
// name:物品名称
// number:物品数量
// method:物品获取方式
// level:关卡名称
public static void buy(String name, int number, String method, String level)
 
// name:物品名称
// number:物品数量
// coinType:虚拟币类型
// coin:消费的虚拟币数量
// level:关卡名称
public static void buy(String name, int number, String coinType, int coin, String level)
 
// name:物品名称
// type: 物品类型
// number:物品数量
// coin:消费的虚拟币数量
public static void buy(String name, String type, int number, int coin)
 
// name:物品名称
// type: 物品类型
// number:物品数量
// method:物品获取方式
public static void buy(String name, String type, int number, String method)
 
// name:物品名称
// type: 物品类型
// number:物品数量
// coinType: 虚拟币类型
// coin:消费的虚拟币数量
public static void buy(String name, String type, int number, String coinType, int coin)
 
// name:物品名称
// type: 物品类型
// number:物品数量
// coin:消费的虚拟币数量
// level:关卡名称
public static void buy(String name, String type, int number, int coin, String level)
 
// name:物品名称
// type: 物品类型
// number:物品数量
// method:物品获取方式
// level:关卡名称
public static void buy(String name, String type, int number, String method, String level)
 
// name:物品名称
// type: 物品类型
// number:物品数量
// coinType:虚拟币类型
// coin:消费的虚拟币数量
// level:关卡名称
public static void buy(String name, String type, int number, String coinType, int coin, String level)

 

2.5 物品消耗统计API

// name:物品名称
// number:物品数量
// coin:物品对应的虚拟币数量
public static void use(String name, int number, int coin)
 
// name:物品名称
// number:物品数量
// coinType:虚拟币类型
// coin:物品对应的虚拟币数量
public static void use(String name, int number, String coinType, int coin)
 
// name:物品名称
// type: 物品类型
// number:物品数量
// coin:物品对应的虚拟币数量
public static void use(String name, String type, int number, int coin)
 
// name:物品名称
// type: 物品类型
// number:物品数量
// coinType:虚拟币类型
// coin:物品对应的虚拟币数量
public static void use(String name, String type, int number, String coinType, int coin)
 
// name:物品名称
// number:物品数量
// coin:物品对应的虚拟币数量
// level:关卡名称
public static void use(String name, int number, int coin, String level)
 
// name:物品名称
// number:物品数量
// coinType:虚拟币类型
// coin:物品对应的虚拟币数量
// level:关卡名称
public static void use(String name, int number, String coinType, int coin, String level)
 
// name:物品名称
// type: 物品类型
// number:物品数量
// coin:物品对应的虚拟币数量
// level:关卡名称
public static void use(String name, String type, int number, int coin, String level)
 
// name:物品名称
// type: 物品类型
// number:物品数量
// coinType:虚拟币类型
// coin:物品对应的虚拟币数量
// level:关卡名称
public static void use(String name, String type, int number, String coinType, int coin, String level)

 

2.6 玩家统计API

// id:玩家标识
// age:年龄
// gender:性别
// source:玩家来源(游戏自定义,给每个渠道用户定义的字符串类型值,如:”qihoo360”,”weibo”)
// rank:玩家等级
// server:区域服务器名称
// comment:其他备注信息
public static void player(String id, int age, int gender, String source, String rank, String server, String comment)

 

2.7 角色统计API

// role:当前玩家标识设置的角色名
public static void role(String role)

 

2.8 自定义事件统计API

自定义事件

// id: 事件标识
// map:事件属性名和值的键值对
public static void event(String id, Map<String, String> map)
// 如果在service中,请使用包含上下文参数的方法:
public static void event(Context ctx, String id, Map<String, String> map)

 

开始自定义事件

// id: 事件标识
// map:事件属性名和值的键值对
public static void eventBegin(String id, Map<String, String> map)
// 如果在service中,请使用包含上下文参数的方法:
public static void eventBegin(Context ctx, String id, Map<String, String> map)

 

结束自定义事件

// id: 事件标识
// map:事件属性名和值的键值对
public static void eventEnd(String id, Map<String, String> map)
// 如果在service中,请使用包含上下文参数的方法:
public static void eventEnd(Context ctx, String id, Map<String, String> map)

 

2.9 获取用户在线配置参数API

// key:参数名
// defValue:默认参数值
// 返回用户自定义参数值
public static String getConfParameter(Context ctx, String key, String defValue)

以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号