提交 321d61d0 作者: 张梦磊

快手

上级 db954549
/.idea/*
dist
*.xcuserstate
project.xcworkspace
xcuserdata
UserInterfaceState.xcuserstate
project.xcworkspace/
xcuserdata/
UserInterface.xcuserstate
\ No newline at end of file
v1.0
++ /dev/null
v1.0
## AI敏感词聊天记录上报接口
定时同步匹配到敏感词的聊天记录
### 请求方式
1. POST 数据结构 JSON
2. Header数据需要加验证参数 Authorization
3. Authorization 将请求数据,
b.拼接参数 string = "date=yyyy-mm-dd(例如:2024-11-19)" + secert;
c. 将string 转为32 位的md5数据, stringMd5 = string.md5();
d. 截取stringMd5 第二位到第17位, 一共 16位字符串, 之后转为大写, 为Authorization
#### 1. AI敏感词聊天记录上报接口
https://zyouapi.wozhangwan.com/server/chat/chatSensitiveReport
请求数据
| 字段 | 是否必传 | 字段类型 | | |
|-------------------|------|----------|---------------------|---------------------|
| token | 是 | String | 谛听token | data里面只传该token下面的数据 | |
| data | 是 | Object[] | 传输具体数据 | 一次最多1000条 | | |
| data.log_id | 是 | String | 记录唯一id | | | |
| data.role_id | 是 | String | 角色ID | | | |
| data.action_time | 是 | dateTime | 发送时间 | | | |
| data.context | 是 | String | 聊天内容 | | | |
| data.context_type | 否 | String | 文本类型 | | | |
| data.channel_id | 否 | String | 渠道ID | |
| data.user_id | 否 | String | 用户ID | |
| data.ip | 否 | String | IP | |
| data.room_id | 是 | String | 聊天ID | | | |
| data.room_name | 否 | String | 聊天室名 | | | |
| data.area | 是 | String | 区服ID | | | |
| data.label | 是 | String | 标签 | | | |
| data.receive_id | 否 | String | 消息接受者 私聊场景下聊天对象角色ID | | | |
返回数据
| | 是否必要 | 字段类型 | |
| ---- | -------- | -------- | --------------------- |
| status_code | 是 | int | 1 成功 2 失败 |
| msg | 是 | string | 返回信息 : 处理成功 |
```shell
```
\ No newline at end of file
v1.0
++ /dev/null
v1.0
## 聊天记录敏感检查接口
检查是否可以发送
### 请求方式
1. POST 数据结构 JSON
2. Header数据需要加验证参数 Authorization
3. Authorization 将请求数据,
a. 按照key ascll 码小到大排序,
b.拼接参数 string = "key1=value1&key2=value2" + secert;
c. 将string 转为32 位的md5数据, stringMd5 = string.md5();
d. 截取stringMd5 第二位到第17位, 一共 16位字符串, 之后转为大写, 为Authorization
#### 1. 掌游AI聊天记录接口
https://zyouapi.wozhangwan.com/server/chat/chatRickReport
请求数据
| 字段 | 是否必传 | 字段类型 | | |
|------------------| -------- | -------- |-----------------------------------------| ---- |
| zw_app_id | 是 | String | 掌玩appId | |
| cp_role_id | 是 | String | 发言角色ID | |
| action_time | 是 | dateTime | 发送时间 | |
| context | 是 | String | 聊天内容 | |
| context_type | 是 | String | 文本类型,默认为'chat' 聊天 'nick' 昵称 'post' 帖子 | |
| channel_id | 否 | String | 渠道ID | |
| user_id | 否 | String | 用户ID | |
| ip | 否 | String | IP | |
| room_id | 否 | String | 聊天ID | |
| room_name | 否 | String | 聊天室名 | |
| server_id | 否 | String | 区服ID | |
| game_version | 否 | String | 游戏版本号 用于游戏区分不同版本 | |
| receive_id | 否 | String | 消息接受者 私聊场景下聊天对象角色ID | |
| main_game_id | 是 | int | 主游戏ID | |
| open_server_time | 是 | dateTime | 开服时间 | |
返回数据
| | 是否必要 | 字段类型 | |
| --------------- | -------- | -------- | ------------------------------------------------------------ |
| status_code | 是 | int | 1 成功 2 失败 |
| msg | 是 | string | 返回信息 : 处理成功 |
| data | 是 | Object | |
| data.label | 是 | string | 标签 normal: 正常; politics: 政治敏感; terror: 暴恐违禁; porn: 文本色情; ad:恶意推广; curse: 咒骂敌视; nonsense: 刷屏灌水; customize: 用户自定义。 |
| data.suggestion | 是 | String | 是否通过 pass: 通过。 review: 建议人工审核。 block: 文本不合规,建议屏蔽。 |
```shell
请注意:room_id需要传聊天室id,我们需要根据不同的聊天类型设置不同的检测规则,让消息的拦截更智能和精准。
所需的聊天类型:
● 世界:1
● 行会:2
● 系统:3
● 地图:4
● 组队:5
● 跨服:8
● 个人:100
数据传输内容
● 聊天审核:在玩家发送聊天时, 调用审核接口,其中context为聊天内容   context_type设置为 chat
● 昵称审核:在玩家设置昵称或更改昵称时,调用审核接口,  其中context为待审核文本(昵称名), context_type设置为 nick, 昵称审核时若无角色ID(cp_role_id), 则不传cp_role_id字段或传空字符串, 注意不要传0
● 行会公告审核:在玩家设置行会公告时,调用审核接口,其中context为待审核文本(公告内容), context_type设置为post
● 行会昵称审核:在玩家设置行会昵称时,调用审核接口,其中context为待审核文本(行会昵称名), context_type设置为nick
● 区服审核:当调用审核服务时,  接口传输增加一个字段,字段名为server_id 内容为区服,类型为字符串
返回结果处理
● 接口返回结果中 suggestion 为pass则允许发送该聊天 为block或review均拦截
```
\ No newline at end of file
v1.0
++ /dev/null
v1.0
## AI自动封禁上报接口
接受AI自动封禁数据
### 请求方式
1. POST 数据结构 JSON
2. Header数据需要加验证参数 Authorization
3. Authorization 将请求数据,
a. 按照key ascll 码小到大排序,
b.拼接参数 string = "cp_role_id=value1&cp_account=value2&time=当天的年月日date('Y-m-d')" + secert;
c. 将string 转为32 位的md5数据, stringMd5 = string.md5();
d. 截取stringMd5 第二位到第17位, 一共 16位字符串, 之后转为大写, 为Authorization
#### 1. AI自动封禁上报接口
https://zyouapi.wozhangwan.com/server/chat/bannedReport
请求数据
| 字段 | 是否必传 | 字段类型 | | |
| ---------------- | -------- | -------- | ----------------------------------------- | ---- |
| main_game_name | 是 | String | 主游戏名称 | |
| cp_role_id | 是 | String | 角色ID | |
| server_id | 是 | String | 区服ID | |
| cp_account | 是 | String | 用户ID | |
| action_time | 是 | dateTime | 发送时间 | |
| banned_time_type | 是 | Int | 封禁时间单位 1小时2天3永久封禁4分钟 | |
| banned_time | 是 | String | 封禁时间 | |
| banned | 是 | Object | 封禁详情 | |
| banned.project | 是 | String | 所属项目 | | | |
| banned.cp_role_id | 是 | String | 角色id | | | |
| banned.list_type | 是 | String | 名单类型 | | | |
| banned.current_hit | 是 | String | 当前命中 | | | |
| banned.hit_total | 是 | String | 累计命中 | | | |
| banned.release_time | 是 | dateTime | 释放时间 | | | |
| banned.handel_user | 是 | String | 操作用户 | | | |
| banned.remark | 是 | String | 备注信息 | | | |
| banned.hit | 是 | Array | 命中统计 | | | |
| banned.hit.content | 是 | String | 命中文本 | | | |
| banned.hit.type | 是 | String | 命中类型 | | | |
| banned.hit.key | 是 | String | 关键字 | | | |
| banned.hit.time | 是 | dateTime | 时间 | | | | | |
返回数据
| | 是否必要 | 字段类型 | |
| ---- | -------- | -------- | --------------------- |
| status_code | 是 | int | 1 成功 2 失败 |
| msg | 是 | string | 返回信息 : 处理成功 |
## AI获取角色标签接口
提供查询角色标签接口
### 请求方式
1. POST 数据结构 JSON
2. Header数据需要加验证参数 Authorization
#### 1. AI获取角色标签接口
https://zyouapi.wozhangwan.com/server/chat/getRoleLabel
请求数据
| 字段 | 是否必传 | 字段类型 | | |
| ---------------- | -------- | -------- | ----------------------------------------- | ---- |
| cp_role_id | 是 | String | 角色ID | |
| token | 是 | String | token 谛听 | |
返回数据
| | 是否必要 | 字段类型 | |
| ---- | -------- | -------- | --------------------- |
| status_code | 是 | int | 1 成功 2 失败 |
| msg | 是 | string | 返回信息 : 处理成功 |
| data | 是 | obj | 返回信息 : |
| data.level | 是 | string | 标签 : |
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
/build
\ No newline at end of file
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
namespace 'com.zwwl.game.zygamesdk'
compileSdk 34
defaultConfig {
applicationId "com.android.game.zw.xmd"
minSdk 24
targetSdk 34
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
composeOptions {
kotlinCompilerExtensionVersion '1.5.1'
}
packaging {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', includes: ['*.aar'])
implementation fileTree(dir: 'libs', includes: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.zw.game.sdk:gameSDk:2.2.2.5'
implementation 'com.bytedance.applog:RangersAppLog-Lite-cn:6.15.4'
//// 商业化组件(必须) 6.14.2 以上版本商业化组件独立,注:必须接入以免平台限制应用上传
implementation 'com.bytedance.applog:RangersAppLog-All-convert:6.15.4'
//Glide
}
\ No newline at end of file
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
\ No newline at end of file
package com.zwwl.game.zygamesdk;
import android.app.Application;
import com.zw.game.sdk.app.GameService;
/**
* @Description: 类作用描述
* @Author: ltt
* @CreateDate: 2022/3/7 16:37
*/
public class App extends Application {
@Override
public void onCreate() {
super.onCreate();
GameService.getInstance().initApplication(this);
}
}
package com.zwwl.game.zygamesdk;
import android.app.Activity;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.util.SparseArray;
import android.widget.GridView;
import com.zw.game.sdk.app.GameService;
import com.zwwl.game.zygamesdk.adapter.ListViewAdapter;
import com.zwwl.game.zygamesdk.manager.ModuleManager;
import com.zwwl.game.zygamesdk.module.BaseModule;
import com.zwwl.game.zygamesdk.utils.AppUtils;
public class ZyMainActivity extends Activity {
private SparseArray<BaseModule> mNameList;
private GridView mModuleListView;
private ListViewAdapter adapter;
private BaseModule mSeletedModule;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_zy_main);
AppUtils.updateActivity(this);
init();
AppUtils.ZySdkInit();
}
private void init(){
mNameList = ModuleManager.sModulesList;
mModuleListView = (GridView) findViewById(R.id.gridview);
mModuleListView.setSelector(new ColorDrawable(Color.TRANSPARENT));
adapter = new ListViewAdapter(this, mNameList);
mModuleListView.setAdapter(adapter);
mModuleListView.setOnItemClickListener((parent, view, position, id) -> {
mSeletedModule = mNameList.get(mNameList.keyAt(position));
if ("SDK初始化".equals(mSeletedModule.name)){
AppUtils.ZySdkInit();
}else if("SDK登录".equals(mSeletedModule.name)){
AppUtils.showSdkLogin();
}else if("退出登录".equals(mSeletedModule.name)){
AppUtils.outLogin();
}else if("SDK支付".equals(mSeletedModule.name)){
AppUtils.createOrder();
}else if("角色上报".equals(mSeletedModule.name)){
AppUtils.onRole();
}else if("行为角色上报".equals(mSeletedModule.name)){
AppUtils.putRolePort();
}
});
}
@Override
protected void onDestroy() {
super.onDestroy();
AppUtils.onDestroy();
}
@Override
public void onBackPressed() {
AppUtils.onBackPressed();
}
}
\ No newline at end of file
package com.zwwl.game.zygamesdk.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.zwwl.game.zygamesdk.R;
import java.util.List;
/**
* Created by Administrator on 2016/5/6.
*/
public class EventAdapter extends BaseAdapter {
private Context mcontext;
private List<String> list_string;
private ViewHolder viewHolder;
private boolean isOpen=false;
public EventAdapter(Context context, List<String> list_string) {
mcontext = context;
this.list_string = list_string;
}
@Override
public int getCount() {
return list_string.size();
}
@Override
public Object getItem(int position) {
return list_string.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
viewHolder = new ViewHolder();
convertView = LayoutInflater.from(mcontext).inflate(R.layout.spinner_layout, null);
viewHolder.textView = (TextView) convertView.findViewById(R.id.textView);
convertView.setTag(viewHolder);
} else {
viewHolder = (ViewHolder) convertView.getTag();
}
viewHolder.textView.setText(list_string.get(position));
return convertView;
}
class ViewHolder {
private TextView textView;
}
}
package com.zwwl.game.zygamesdk.adapter;
import android.content.Context;
import android.text.TextUtils;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.zwwl.game.zygamesdk.R;
import com.zwwl.game.zygamesdk.module.BaseModule;
public class ListViewAdapter extends BaseAdapter {
private SparseArray<BaseModule> mDataArray;
private Context mContext;
public ListViewAdapter(@NonNull Context context, @NonNull SparseArray<BaseModule> moduleArray) {
this.mDataArray = moduleArray;
mContext = context;
}
@Override
public int getCount() {
return mDataArray.size();
}
@Override
public BaseModule getItem(int position) {
return mDataArray.get(mDataArray.keyAt(position));
}
@Override
public long getItemId(int position) {
return 0;
}
private static class ViewHolder {
TextView name;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder;
View view = convertView;
if (view == null) {
view = LayoutInflater.from(mContext).inflate(R.layout.gridview_item, null);
holder = new ViewHolder();
TextView itemText = view.findViewById(R.id.item_txt);
holder.name = itemText;
view.setTag(holder);
} else {
holder = (ViewHolder) view.getTag();
}
String item = getItem(position).name;
if (TextUtils.isEmpty(item)) {
return null;
}
updateViewByPlatform(holder, view, item);
holder.name.setText(item);
return view;
}
private void updateViewByPlatform(ViewHolder holder, View view, String item) {
handleRenderViewByQQPlatform(holder, view, item);
}
private void handleRenderViewByQQPlatform(ViewHolder holder, View view, String item) {
renderInactiveView(holder, view);
}
private void renderActiveView(ViewHolder holder, View view) {
view.getBackground().setAlpha(255);
holder.name.setTextColor(0xff000000);
}
public void switchInit(boolean isLogin) {
notifyDataSetChanged();
}
private void renderInactiveView(ViewHolder holder, View view) {
view.getBackground().setAlpha(60);
holder.name.setTextColor(0x60000000);
}
}
package com.zwwl.game.zygamesdk.manager;
import android.util.SparseArray;
import com.zwwl.game.zygamesdk.module.BaseModule;
import com.zwwl.game.zygamesdk.module.InitModel;
import com.zwwl.game.zygamesdk.module.LoginModel;
import com.zwwl.game.zygamesdk.module.OutModel;
import com.zwwl.game.zygamesdk.module.PlayModel;
import com.zwwl.game.zygamesdk.module.RoleModel;
import com.zwwl.game.zygamesdk.module.RoleReportModel;
public class ModuleManager {
public static final int INIT = 1;
public static final int SDK_LOGIN = 1 << 1;
public static final int SDK_OUT = 1 << 3;
public static final int PLAY = 1 << 4;
public static final int ROLE_UP = 1 << 5;
public static final int REGISTEREMODEL = 1 << 6;
public static final int JULIANGPLAYMODEL = 1 << 7;
public static final int ROLE_PORT = 1 << 8;
public static final int SHOW_BALL = 1 << 10;
public static final int SEETTINGS = 1 << 11;
public static final int CHAYE = 1 << 12;
public static final int YINSI=1 << 13;
public static final int HASH_KEY=1 << 14;
public static final int CP_SET=1 << 15;
public static final int CP_GET=1 << 16;
public static String LANG;
public static SparseArray<BaseModule> sModulesList;
static {
// 添加模块
sModulesList = new SparseArray<>();
sModulesList.append(INIT, new InitModel());
sModulesList.append(SDK_LOGIN, new LoginModel());
sModulesList.append(SDK_OUT, new OutModel());
sModulesList.append(PLAY, new PlayModel());
sModulesList.append(ROLE_UP, new RoleModel());
sModulesList.append(ROLE_PORT, new RoleReportModel());
// sModulesList.append(REGISTEREMODEL, new RegistereModel());
// sModulesList.append(JULIANGPLAYMODEL, new JuLiangPlayModel());
}
private ModuleManager() {
}
}
package com.zwwl.game.zygamesdk.module;
import android.widget.LinearLayout;
public class ActivitiesModel extends BaseModule{
public ActivitiesModel() {
this.name = "活动页";
}
@Override
public void init(LinearLayout parent) {
}
}
package com.zwwl.game.zygamesdk.module;
import android.widget.LinearLayout;
public abstract class BaseModule {
public String name;
public abstract void init(LinearLayout parent);
}
package com.zwwl.game.zygamesdk.module;
import android.widget.LinearLayout;
public class InitModel extends BaseModule{
public InitModel() {
this.name = "SDK初始化";
}
@Override
public void init(LinearLayout parent) {
}
}
package com.zwwl.game.zygamesdk.module;
import android.widget.LinearLayout;
public class JuLiangPlayModel extends BaseModule{
public JuLiangPlayModel() {
this.name = "巨量付费";
}
@Override
public void init(LinearLayout parent) {
}
}
package com.zwwl.game.zygamesdk.module;
import android.widget.LinearLayout;
public class LoginModel extends BaseModule{
public LoginModel() {
this.name = "SDK登录";
}
@Override
public void init(LinearLayout parent) {
}
}
package com.zwwl.game.zygamesdk.module;
import android.widget.LinearLayout;
public class OutModel extends BaseModule{
public OutModel() {
this.name = "退出登录";
}
@Override
public void init(LinearLayout parent) {
}
}
package com.zwwl.game.zygamesdk.module;
import android.widget.LinearLayout;
public class PlayModel extends BaseModule{
public PlayModel() {
this.name = "SDK支付";
}
@Override
public void init(LinearLayout parent) {
}
}
package com.zwwl.game.zygamesdk.module;
import android.widget.LinearLayout;
public class RegistereModel extends BaseModule{
public RegistereModel() {
this.name = "巨量注册";
}
@Override
public void init(LinearLayout parent) {
}
}
package com.zwwl.game.zygamesdk.module;
import android.widget.LinearLayout;
public class RoleModel extends BaseModule{
public RoleModel() {
this.name = "角色上报";
}
@Override
public void init(LinearLayout parent) {
}
}
package com.zwwl.game.zygamesdk.module;
import android.widget.LinearLayout;
public class RoleReportModel extends BaseModule{
public RoleReportModel() {
this.name = "行为角色上报";
}
@Override
public void init(LinearLayout parent) {
}
}
package com.zwwl.game.zygamesdk.utils;
import android.app.Activity;
import android.util.Log;
import android.widget.Toast;
import androidx.annotation.Nullable;
import com.zw.game.sdk.api.CustomPayParam;
import com.zw.game.sdk.api.GameInfoSetting;
import com.zw.game.sdk.api.GameRoleInfo;
import com.zw.game.sdk.api.QueryBean;
import com.zw.game.sdk.api.RoleReportParam;
import com.zw.game.sdk.app.GameService;
import com.zw.game.sdk.callback.InitZyCallback;
import com.zw.game.sdk.callback.OnLoginListener;
import com.zw.game.sdk.callback.OnLogoutListener;
import com.zw.game.sdk.callback.OnPaymentListener;
import com.zw.game.sdk.callback.SubmitRoleInfoCallBack;
import com.zw.game.sdk.callback.ZyListener;
import com.zw.game.sdk.config.ConfigInfo;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
public class AppUtils {
private static String TAG="SDK-AppUtils";
private static WeakReference<Activity> sActivityRef = null;
public static void updateActivity(Activity activity) {
sActivityRef = new WeakReference<>(activity);
}
public static @Nullable
Activity getCurActivity() {
if (sActivityRef == null) {
return null;
}
return sActivityRef.get();
}
public static void showToast(String msg){
Toast.makeText(getCurActivity(),msg,Toast.LENGTH_LONG).show();
}
/**
* SDK初始化
*/
public static void ZySdkInit(){
GameService.getInstance().onCreate(getCurActivity(), new InitZyCallback() {
@Override
public void onSuccess(int status) {
switch (status){
case -1:
showToast("退出登录失败");
break;
case 1:
showToast("初始化成功");
break;
case 2:
showToast("初始化失败");
break;
case 3:
showToast("退出登录成功");
break;
default:
showToast("初始化失败");
break;
}
// status=3 退出登录成功
Log.e(TAG,"SDK初始化:"+status);
}
@Override
public void onFailed(Object o) {
showToast(o.toString());
}
});
ConfigInfo.allowPORTRAIT = false;
//是否半隐藏悬浮球
ConfigInfo.FLOAT_VIEW = false;
GameService.getInstance().getPrivacyCallBack(data -> {
});
}
public static void showSdkLogin(){
GameService.getInstance().showLogin(new OnLoginListener() {
@Override
public void loginSuccess(Object data) {
GameService.getInstance().showBall(getCurActivity());
Log.e("loginSuccess", data+"\n");
}
@Override
public void loginError(Object data) {
Log.e("loginSuccess:loginError", data + "");
}
});
}
public static void onBackPressed() {
GameService.getInstance().exitApp();
}
public static void onDestroy() {
GameService.getInstance().onDestroy(getCurActivity());
}
/**
* 退出登录
*/
public static void outLogin(){
GameService.getInstance().outGameLogin(new OnLogoutListener() {
@Override
public void logoutSuccess(Object s) {
Log.e("GameSdkTAG", s.toString());
}
@Override
public void logoutError(Object s) {
Log.e("GameSdkTAG", "logoutError" + s);
}
});
}
public static void onRole() {
GameInfoSetting setting = new GameInfoSetting();
setting.setCp_account("w55231582254");//CP账户
GameRoleInfo roleInfo = new GameRoleInfo();
roleInfo.setEvent("create");//事件类型,online: 角色登录, create: 创建角色,level_up: 提升等级,offline: 角色退出,other: 其他,delete: 删除角色
roleInfo.setServer_id("100001");//区服ID
roleInfo.setServer_name("主宰服");//区服
roleInfo.setCp_role_id(System.currentTimeMillis() + "");//CP角色ID
roleInfo.setRole_name("大鲨鱼");//角色名称
roleInfo.setRole_level("15"); //角色等级
roleInfo.setRole_vip("23");//角色VIP等级
roleInfo.setCombat_num("25564");//角色战力
roleInfo.setOnline_time("15426");//本次在线时长
roleInfo.setReiki_num("12"); //灵符值
roleInfo.setAttack("0");//攻击力
roleInfo.setProfession("法师");//职业
roleInfo.setGang_name("大竹帮");//帮会(行会)名称
roleInfo.setTrans_level("5");//转生等级
roleInfo.setSponsor_level("12");//赞助等级/会员等级
roleInfo.setMain_city_level("大司马");//官邸等级
roleInfo.setPower("阔克萨斯");//国家
roleInfo.setChapter_index("12");//章节等级
setting.setRole(roleInfo);
GameService.getInstance().putRoleReport(setting, new SubmitRoleInfoCallBack() {
@Override
public void onSuccess(Object o) {
showToast(o.toString());
}
@Override
public void onFailure(int code, String msg) {
showToast(msg);
}
});
}
/**
* 普通角色上报
*/
public static void createOrder() {
CustomPayParam data = new CustomPayParam();
CustomPayParam.RoleBean role = new CustomPayParam.RoleBean();
CustomPayParam.OrderBean orderInfo = new CustomPayParam.OrderBean();
role.setEvent("other");
role.setServer_id("100001");
role.setRole_name("主宰传奇");
role.setCp_role_id(System.currentTimeMillis() + "");
role.setServer_name("主宰服");
role.setRole_level("83");
role.setRole_vip("0");
orderInfo.setCp_order_id(System.currentTimeMillis() + "");
orderInfo.setAmount("100");
orderInfo.setProduct_price("100");
orderInfo.setProduct_id("101");
orderInfo.setProduct_cnt("1");
orderInfo.setProduct_name("1元档充值");
orderInfo.setProduct_desc("商品");
orderInfo.setExt("测试数据");
data.setRole(role);
data.setOrder(orderInfo);
GameService.getInstance().showPay(data, new OnPaymentListener() {
@Override
public void Success(Object msg) {
}
@Override
public void Failed(String msg) {
}
});
}
/**
* 行为角色上报
*/
public static void putRolePort(){
RoleReportParam param=new RoleReportParam();
List<QueryBean> queryBeanList=new ArrayList<>();
param.setEvent("coin_get");
param.setRole_name("张飞");
param.setCp_role_id("11");
for (int i = 0; i < 5; i++) {
QueryBean queryBean=new QueryBean();
queryBean.setName("角色具体信息"+i);
queryBean.setValue(String.valueOf(i));
queryBeanList.add(queryBean);
}
param.setQuerys(queryBeanList);
GameService.getInstance().putGameRoleport(param, new ZyListener() {
@Override
public void Success(Object s) {
}
@Override
public void Error(Object s) {
}
});
}
}
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#FFFFFF" />
<stroke android:color="@color/bg_dev" android:width="1dp"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@color/holo_color_pressed" />
<item android:state_window_focused="false" android:drawable="@color/transparent" />
<item android:state_window_focused="true" android:drawable="@color/transparent" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffffff" />
<stroke
android:width="1dp"
android:color="@color/teal_200" />
<padding
android:bottom="1dp"
android:left="0.5dp"
android:right="0.5dp"
android:top="0dp" />
<corners android:radius="4dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 实心 -->
<solid android:color="@color/transparent" />
<!-- 描边 -->
<stroke
android:width="1dp"
android:color="#33b5e5" />
<!-- 圆角 -->
<corners android:radius="8dp" />
<padding
android:bottom="5dp"
android:left="0.5dp"
android:right="0.5dp"
android:top="0dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:orientation="vertical"
android:background="@color/white"
android:layout_height="match_parent">
<TextView
android:textSize="18dp"
android:text="掌玩SDK"
android:gravity="center"
android:background="@color/text_qq"
android:textColor="@color/white"
android:layout_width="match_parent"
android:layout_height="50dp"/>
<GridView
android:id="@+id/gridview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:numColumns="2"
android:verticalSpacing="10dp"
android:horizontalSpacing="10dp"
android:layout_marginTop="15dp"
android:layout_marginLeft="3dp"
android:layout_marginRight="3dp"
android:layout_marginBottom="3dp"
android:stretchMode="columnWidth"
android:gravity="center"
tools:ignore="MissingConstraints" />
<TextView
android:id="@+id/tv_text"
android:layout_width="match_parent"
android:padding="10dp"
tools:text="@string/app_name"
tools:textColor="@color/primary_text"
android:textColor="@color/primary_text"
android:layout_height="wrap_content"/>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/gridview_llayout">
<TextView
android:id="@+id/item_txt"
android:layout_width="match_parent"
android:layout_height="58dp"
android:layout_gravity="center"
android:gravity="center"
android:textSize="17sp"
android:textColor="#000000"
android:background="@drawable/gridview_click" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/dialog_dev_edi"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="10dp"
android:textColor="@color/text_black"
android:textSize="12sp"
tools:hint="testawerw" />
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="transparent">#00000000</color>
<color name="btn_green_up">#00CC99</color>
<color name="btn_green_down">#99FFCD</color>
<color name="holo_color_pressed">#5533b5e5</color>
</resources>
\ No newline at end of file
<resources>
<string name="app_name">ZyGameSdk</string>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="gridview_llayout">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_margin">10dp</item>
<item name="android:background">@drawable/gridview_layoutborder</item>
<item name="android:gravity">center</item>
<item name="android:orientation">vertical</item>
<item name="android:layout_weight">1</item>
</style>
<style name="demo_layout">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_margin">10dp</item>
<item name="android:background">@drawable/layout_border</item>
<item name="android:gravity">center</item>
<item name="android:orientation">vertical</item>
<item name="android:layout_weight">1</item>
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.ZyGameSdk" parent="android:Theme.Material.Light.NoActionBar" />
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!--
Sample backup rules file; uncomment and customize as necessary.
See https://developer.android.com/guide/topics/data/autobackup
for details.
Note: This file is ignored for devices older that API 31
See https://developer.android.com/about/versions/12/backup-restore
-->
<full-backup-content>
<!--
<include domain="sharedpref" path="."/>
<exclude domain="sharedpref" path="device.xml"/>
-->
</full-backup-content>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!--
Sample data extraction rules file; uncomment and customize as necessary.
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
for details.
-->
<data-extraction-rules>
<cloud-backup>
<!-- TODO: Use <include> and <exclude> to control what is backed up.
<include .../>
<exclude .../>
-->
</cloud-backup>
<!--
<device-transfer>
<include .../>
<exclude .../>
</device-transfer>
-->
</data-extraction-rules>
\ No newline at end of file
package com.zwwl.game.zygamesdk
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
}
\ No newline at end of file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.2.2' apply false
id 'org.jetbrains.kotlin.android' version '1.9.0' apply false
}
\ No newline at end of file
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
\ No newline at end of file
#Wed Jul 10 14:46:14 CST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
maven { url "https://www.jitpack.io" }
maven { url 'https://repo1.maven.org/maven2/' }
maven { url 'http://nexus.zwwlkj01.top/repository/android-game/'
allowInsecureProtocol=true
}
maven {
url 'https://artifact.bytedance.com/repository/Volcengine/'
}
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/central' }
}
}
rootProject.name = "ZyGameSdk"
include ':app'
\ No newline at end of file
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
signingConfigs {
debug {
storeFile file('E:\\working\\ZyouSDK-Android\\GameSdkCq\\app\\config\\cqbz.jks')
storePassword '123456'
keyAlias 'zwwl'
keyPassword '123456'
}
}
namespace 'com.zwwl.game.tencentdemo'
compileSdk 34
defaultConfig {
applicationId "com.tencent.tmgp.zwwl.fsz"
minSdk 24
targetSdk 34
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
signingConfig signingConfigs.debug
minifyEnabled false
// testCoverageEnabled true
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86'
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.5.1'
}
packaging {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
implementation 'androidx.activity:activity-compose:1.7.0'
implementation platform('androidx.compose:compose-bom:2023.08.00')
implementation 'androidx.compose.material3:material3'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation platform('androidx.compose:compose-bom:2023.08.00')
implementation 'com.zw.game.tencent.sdk:gameSDk:1.0.8'
}
\ No newline at end of file
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
\ No newline at end of file
package com.zwwl.game.tencentdemo
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Assert.*
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.zwwl.game.tencentdemo", appContext.packageName)
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:allowBackup="true"
android:name=".App"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.TencentDemo"
tools:targetApi="31">
<activity
android:name=".TencentActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.TencentDemo">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- 掌玩SDK游戏ID -->
<meta-data
android:name="game_id"
android:value="659" />
<meta-data
android:name="app_id"
android:value="0" /> <!-- 腾讯广告必填 -->
<meta-data
android:name="secret"
android:value="secret" /> <!-- 快手平台申请应用名称,不是快手投放包可以选择不填写 -->
<meta-data
android:name="app_name"
android:value="hycq" /> <!-- 0默认SDK,1表示巨量AD,2表示快手,3表示腾讯 -->
<meta-data
android:name="app_status"
android:value="0" />
</application>
</manifest>
\ No newline at end of file
package com.zwwl.game.tencentdemo;
import com.zw.game.sdk.app.BaseApplication;
import com.zw.game.sdk.app.GameApplicationService;
public class App extends BaseApplication {
@Override
public void onCreate() {
super.onCreate();
GameApplicationService.getInstance().onCreate(this);
}
}
package com.zwwl.game.tencentdemo;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import androidx.annotation.Nullable;
import com.zw.game.sdk.api.CustomPayParam;
import com.zw.game.sdk.api.GameInfoSetting;
import com.zw.game.sdk.api.GameRoleInfo;
import com.zw.game.sdk.app.ApiSdkService;
import com.zw.game.sdk.app.GameService;
import com.zw.game.sdk.callback.InitZyCallback;
import com.zw.game.sdk.callback.OnLoginListener;
import com.zw.game.sdk.callback.OnLogoutListener;
import com.zw.game.sdk.callback.PlayTencentListener;
import com.zw.game.sdk.callback.SubmitRoleInfoCallBack;
import com.zw.game.sdk.config.ConfigInfo;
public class TencentActivity extends Activity {
private String TAG="TencentActivityName";
private Button mButtonStartLogin;
private Button mButtonStartPlay;
private Button mButtonStartOut;
private Button mButtonStartRole;
private Activity mActivity;
@SuppressLint("MissingInflatedId")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tencent);
mActivity=this;
init();
mButtonStartLogin=findViewById(R.id.btn_start);
mButtonStartPlay=findViewById(R.id.btnPlay);
mButtonStartOut=findViewById(R.id.btn_out);
mButtonStartRole=findViewById(R.id.btnRoleUp);
ApiSdkService.getInstance().init(this);
mButtonStartLogin.setOnClickListener(v -> ApiSdkService.getInstance().showLogin(new OnLoginListener() {
@Override
public void loginSuccess(Object data) {
Log.e(TAG,data.toString());
}
@Override
public void loginError(Object data) {
}
}));
mButtonStartPlay.setOnClickListener(v ->
createOrder()
);
mButtonStartOut.setOnClickListener(v -> ApiSdkService.getInstance().logout(new OnLogoutListener() {
@Override
public void logoutSuccess(Object s) {
}
@Override
public void logoutError(Object s) {
}
}));
mButtonStartRole.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
setRoleUp();
}
});
}
private void init() {
GameService.getInstance().onCreate(this, new InitZyCallback() {
@Override
public void onSuccess(int status) {
}
@Override
public void onFailed(Object o) {
}
});
//配置横竖屏,等一些可配置信息
ConfigInfo.allowPORTRAIT = false;
//是否半隐藏悬浮球
ConfigInfo.FLOAT_VIEW = false;
GameService.getInstance().setIcon(com.zw.game.sdk.R.drawable.chuanqi);
GameService.getInstance().initPrivacy(data -> {
});
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
ApiSdkService.getInstance().onActivityResult(requestCode,resultCode,data);
}
@Override
protected void onResume() {
super.onResume();
ApiSdkService.getInstance().onResume(new OnLoginListener() {
@Override
public void loginSuccess(Object data) {
Log.e(TAG,"onResume:"+data.toString());
}
@Override
public void loginError(Object data) {
}
});
}
private void setRoleUp(){
GameInfoSetting setting = new GameInfoSetting();
setting.setCp_account("w55231582254");//CP账户
GameRoleInfo roleInfo = new GameRoleInfo();
roleInfo.setEvent("create");//事件类型,online: 角色登录, create: 创建角色,level_up: 提升等级,offline: 角色退出,other: 其他,delete: 删除角色
roleInfo.setServer_id("100001");//区服ID
roleInfo.setServer_name("主宰服");//区服
roleInfo.setCp_role_id(System.currentTimeMillis() + "");//CP角色ID
roleInfo.setRole_name("大鲨鱼");//角色名称
roleInfo.setRole_level("15"); //角色等级
roleInfo.setRole_vip("23");//角色VIP等级
roleInfo.setCombat_num("25564");//角色战力
roleInfo.setOnline_time("15426");//本次在线时长
roleInfo.setReiki_num("12"); //灵符值
roleInfo.setAttack("0");//攻击力
roleInfo.setProfession("法师");//职业
roleInfo.setGang_name("大竹帮");//帮会(行会)名称
roleInfo.setTrans_level("5");//转生等级
roleInfo.setSponsor_level("12");//赞助等级/会员等级
roleInfo.setMain_city_level("大司马");//官邸等级
roleInfo.setPower("阔克萨斯");//国家
roleInfo.setChapter_index("12");//章节等级
setting.setRole(roleInfo);
ApiSdkService.getInstance().putRoleReport(this, setting, new SubmitRoleInfoCallBack() {
@Override
public void onSuccess(Object o) {
}
@Override
public void onFailure(int code, String msg) {
}
});
}
private void createOrder() {
CustomPayParam data = new CustomPayParam();
CustomPayParam.RoleBean role = new CustomPayParam.RoleBean();
CustomPayParam.OrderBean orderInfo = new CustomPayParam.OrderBean();
role.setEvent("other");
role.setServer_id("100001");
role.setRole_name("主宰传奇");
role.setCp_role_id(System.currentTimeMillis() + "");
role.setServer_name("主宰服");
role.setRole_level("83");
role.setRole_vip("0");
orderInfo.setCp_order_id(System.currentTimeMillis() + "");
orderInfo.setAmount("1");
orderInfo.setProduct_price("1");
orderInfo.setProduct_id("1");
orderInfo.setProduct_cnt("1");
orderInfo.setProduct_name("1元档充值");
orderInfo.setProduct_desc("商品");
orderInfo.setExt("测试数据");
data.setRole(role);
data.setOrder(orderInfo);
ApiSdkService.getInstance().showPay(data, new PlayTencentListener() {
@Override
public void OnPayNotify(Object msg) {
Log.e(TAG,"腾讯充值回调结果OnPayNotify:"+msg);
}
@Override
public void onPayError(Object msg) {
Log.e(TAG,"腾讯充值回调结果onPayError:"+msg);
}
});
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical">
<Button
android:id="@+id/btn_start"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="腾讯应用宝" />
<Button
android:id="@+id/btnPlay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="腾讯应用宝支付" />
<Button
android:id="@+id/btnRoleUp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="角色上报" />
<Button
android:id="@+id/btn_out"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="退出登录" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
</resources>
\ No newline at end of file
<resources>
<string name="app_name">掌玩游戏腾讯测试包</string>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.TencentDemo" parent="android:Theme.Material.Light.NoActionBar" />
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!--
Sample backup rules file; uncomment and customize as necessary.
See https://developer.android.com/guide/topics/data/autobackup
for details.
Note: This file is ignored for devices older that API 31
See https://developer.android.com/about/versions/12/backup-restore
-->
<full-backup-content>
<!--
<include domain="sharedpref" path="."/>
<exclude domain="sharedpref" path="device.xml"/>
-->
</full-backup-content>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!--
Sample data extraction rules file; uncomment and customize as necessary.
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
for details.
-->
<data-extraction-rules>
<cloud-backup>
<!-- TODO: Use <include> and <exclude> to control what is backed up.
<include .../>
<exclude .../>
-->
</cloud-backup>
<!--
<device-transfer>
<include .../>
<exclude .../>
</device-transfer>
-->
</data-extraction-rules>
\ No newline at end of file
package com.zwwl.game.tencentdemo
import org.junit.Test
import org.junit.Assert.*
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
\ No newline at end of file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.2.2' apply false
id 'org.jetbrains.kotlin.android' version '1.9.0' apply false
}
\ No newline at end of file
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
\ No newline at end of file
#Mon Mar 18 14:41:07 CST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
jcenter()
//掌玩SDK
maven {
url 'http://nexus.zwwlkj01.top/repository/Tencent-SDK/'
allowInsecureProtocol=true
}
}
}
rootProject.name = "TencentDemo"
include ':app'
差异被折叠。 点击展开。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论