简要描述:
语法
public boolean sendRunas(String run_path, String run_args)
参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
run_path | true | String | 进程启动路径 |
run_args | option | String | 进程启动参数 |
备注:
该接口也可用于游戏或者steam等平台快速账号登陆,支持游戏/平台如下:
游戏或平台名 | platform字段 |
---|---|
穿越火线 | ChuanYueHuoXian |
epic | epic |
古剑奇谭OL | gujianqitanol |
剑网3 | jianwang3 |
steam | steam |
uplay | uplay |
wegame | wegame |
原神 | yuanshen |
战网 | zhanwang |
参考代码如下:
public void LoginAccount(String data){
AcountEntity account = JsonUtil.parseJson(data,AcountEntity.class);
LogUtil.d("LoginAccount platform:" + account.platform);
LogUtil.d("LoginAccount account:" + account.account);
LogUtil.d("LoginAccount psw:" + account.psw);
String run_path = "jyshell://" + account.platform;
String account_encode = account_encode(account.account);
String psw_encode = account_encode(account.psw);
WhaleCloud.getInstance().sendRunas(run_path,account_encode + " " + psw_encode);
}
private String account_encode(String data){
byte[] bytes = data.getBytes();
for(int i=0;i<bytes.length;i++){
bytes[i] = (byte)(bytes[i] - 13*(i+1));
}
String encode = android.util.Base64.encodeToString(bytes, android.util.Base64.DEFAULT);
encode = encode.replaceAll("\r", "");
encode = encode.replaceAll("\n", "");
LogUtil.d("encode:" + encode);
return encode;
}