• 大小: 920KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-02
  • 语言: 其他
  • 标签: eclipse  unity  

资源简介

/** * 初始化SDK */ private static void initSDK(String appid, String appkey) { ProxySelector defaultProxySelector = ProxySelector.getDefault(); Proxy proxy = null; List proxyList = null; try { proxyList = defaultProxySelector.select(new URI( "http://www.google.it")); } catch (URISyntaxException e) { e.printStackTrace(); } if (proxyList != null && proxyList.size() > 0) { proxy = proxyList.get(0); Log.d(TAG, "Current Proxy Configuration: " + proxy.toString()); } AppInfo appInfo = new AppInfo(); appInfo.setAppId(appid);// 应用ID appInfo.setAppKey(appkey);// 应用Key appInfo.setCtx(ctx); /* * VersionCheckLevelNormal 版本检查失败可以继续进行游戏 VersionCheckLevelStrict * 版本检查失败则不能进入游戏 默认取值为VersionCheckLevelStrict */ appInfo.setVersionCheckStatus(AppInfo.VERSION_CHECK_LEVEL_STRICT); // 初始化SDK Commplatform.getInstance().Init(0, appInfo, new CallbackListener() { @Override public void callback(final int paramInt, Integer paramT) { ctx.runOnUiThread(new Runnable() { @Override public void run() { Log.i(TAG, "Init paramInt = " + paramInt); // ok.setEnabled(true); LogUtil.send("初始化: " + paramInt); } }); } }); } /** * 用户登录 * */ public static void loginEx(Context context) { Bundle bundle = new Bundle(); bundle.putString("nounce", UUID.randomUUID().toString() .replace("-", "")); Commplatform.getInstance().LoginEx(context, bundle, new CallbackListener() { @Override public void callback(int resultCode, Bundle bundle) { if (resultCode == ErrorCode.COM_PLATFORM_SUCCESS) { // 完成参数验签 // 处理登录成功逻辑 // HomeActivity.show(ctx); // String uin= bundle.getString("uin"); LogUtil.send("登录成功 :"); // String uin= bundle.get("nounce").toString(); String uin = Commplatform.getInstance() .getLoginUin(); LogUtil.send("登录成功 uin :" + uin); UnityPlayer

资源截图

代码片段和文件信息

/** Automatically generated file. DO NOT MODIFY */
package com.hwdemo.hwgame;

public final class BuildConfig {
    public final static boolean DEBUG = true;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-10-19 11:24  hwdemo\
     文件         711  2017-10-19 11:25  hwdemo\.classpath
     文件         842  2017-10-19 11:15  hwdemo\.project
     目录           0  2017-10-19 11:15  hwdemo\.settings\
     文件         177  2017-10-19 11:15  hwdemo\.settings\org.eclipse.jdt.core.prefs
     文件        4481  2017-10-19 11:23  hwdemo\AndroidManifest.xml
     目录           0  2017-10-19 11:15  hwdemo\assets\
     目录           0  2017-10-19 11:17  hwdemo\bin\
     文件        4481  2017-10-19 11:23  hwdemo\bin\AndroidManifest.xml
     目录           0  2017-10-19 11:25  hwdemo\bin\classes\
     目录           0  2017-10-19 11:25  hwdemo\bin\classes\com\
     目录           0  2017-10-19 11:25  hwdemo\bin\classes\com\hw\
     目录           0  2017-10-19 11:25  hwdemo\bin\classes\com\hwdemo\
     目录           0  2017-10-19 11:25  hwdemo\bin\classes\com\hwdemo\hwgame\
     文件         343  2017-10-19 11:25  hwdemo\bin\classes\com\hwdemo\hwgame\BuildConfig.class
     文件         337  2017-10-19 11:29  hwdemo\bin\classes\com\hwdemo\hwgame\R$attr.class
     文件         404  2017-10-19 11:29  hwdemo\bin\classes\com\hwdemo\hwgame\R$drawable.class
     文件         385  2017-10-19 11:29  hwdemo\bin\classes\com\hwdemo\hwgame\R$raw.class
     文件         395  2017-10-19 11:29  hwdemo\bin\classes\com\hwdemo\hwgame\R$string.class
     文件         428  2017-10-19 11:29  hwdemo\bin\classes\com\hwdemo\hwgame\R$style.class
     文件         388  2017-10-19 11:29  hwdemo\bin\classes\com\hwdemo\hwgame\R$xml.class
     文件         567  2017-10-19 11:29  hwdemo\bin\classes\com\hwdemo\hwgame\R.class
     文件        1393  2017-10-19 11:28  hwdemo\bin\classes\com\hwdemo\hwgame\UnityActivity.class
     目录           0  2017-10-19 11:28  hwdemo\bin\classes\com\hw\complatform\
     目录           0  2017-10-19 11:25  hwdemo\bin\classes\com\hw\complatform\database\
     文件         912  2017-10-19 11:25  hwdemo\bin\classes\com\hw\complatform\database\DBOpenManager.class
     文件        1304  2017-10-19 11:25  hwdemo\bin\classes\com\hw\complatform\database\OrderInfo.class
     文件        1490  2017-10-19 11:25  hwdemo\bin\classes\com\hw\complatform\database\PaymentInfo.class
     文件        5390  2017-10-19 11:25  hwdemo\bin\classes\com\hw\complatform\database\PaymentTableAdapter.class
     文件        2746  2017-10-19 11:25  hwdemo\bin\classes\com\hw\complatform\database\UserDBOpenHelper.class
     文件        4365  2017-10-19 11:25  hwdemo\bin\classes\com\hw\complatform\database\UserDBUtils.class
............此处省略66个文件信息

评论

共有 条评论