client_Hale
2018-09-07 e55e2c63390a5140ac6eae581703ff80b959f6a4
Fixed 猫耳AppID读取错误
3个文件已修改
44 ■■■■■ 已修改文件
ChannelDiff/498mrgame/libs/app-game_498mrgame-release.aar 补丁 | 查看 | 原始文档 | blame | 历史
Project/app/src/game_498mrgame/java/com/secondworld/univeralsdk/H2EngineSDK.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Project/app/src/main/java/com/secondworld/univeralsdk/MainActivity.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ChannelDiff/498mrgame/libs/app-game_498mrgame-release.aar
Binary files differ
Project/app/src/game_498mrgame/java/com/secondworld/univeralsdk/H2EngineSDK.java
@@ -99,9 +99,12 @@
                    MrPlatformUtil.getInstance().logout(_activity);
                    break;
                case CodeU2A.FreePlatformPay:
                    String _appID = UniversalUtil.getMetaString(_activity, "Mr_GAME_ID");
                    _appID = _appID.replace("_", "");
                    LogUtil.i(TAG, _appID);
                    JSONObject _extraData = new JSONObject();
                    _extraData.put("appid",
                                   UniversalUtil.getMetaString(_activity, "Mr_ADID") + "_mrgame");
                    _extraData.put("appid", _appID);
                    _extraData.put("cpinfo", _json.getString("cpInfo"));
                    _extraData.put("cporderid", _json.getString("orderId"));
@@ -116,7 +119,6 @@
                                                     _json.getString("notifyurl"));
                    MrPlatformUtil.getInstance().payProcessing = true;
                    break;
                case CodeU2A.PayFinished:
                    MrPlatformUtil.getInstance().payProcessing = false;
@@ -343,7 +345,7 @@
                _msgStruct.clear();
                _msgStruct.put("code", CodeA2U.SdkInitComplete);
                _msgStruct.put("channelPlatform","mr");
                _msgStruct.put("channelPlatform", "mr");
                UniversalUtil.sendMessageToUnity(_msgStruct);
                LogUtil.i(TAG, "初始化执行完毕");
@@ -356,6 +358,22 @@
    {
        // ------------------------------- 猫耳SDK -------------------------------
        MrPlatformUtil.getInstance().init(activity);
    }
    private static boolean m_IsFocus = true;
    public static void onWindowFocusChanged(boolean b)
    {
        if (MrPlatformUtil.getInstance().payProcessing)
        {
            if (b)
            {
                Map<String, Object> _msgStruct = new HashMap<>();
                _msgStruct.put("code", CodeA2U.FreePlatformPayCancel);
                UniversalUtil.sendMessageToUnity(_msgStruct);
                MrPlatformUtil.getInstance().payProcessing = false;
            }
        }
    }
    public static void onNewIntent(final Activity activity, final Intent intent)
@@ -380,7 +398,6 @@
    public static void onStart(final Activity activity)
    {
    }
    public static void onPause(final Activity activity)
@@ -392,7 +409,7 @@
    {
        CommonMrSdk.getInstance().onResume(activity);
        if(MrPlatformUtil.getInstance().payProcessing)
        if (MrPlatformUtil.getInstance().payProcessing)
        {
            Map<String, Object> _msgStruct = new HashMap<>();
            _msgStruct.put("code", CodeA2U.FreePlatformPayCancel);
Project/app/src/main/java/com/secondworld/univeralsdk/MainActivity.java
@@ -41,11 +41,17 @@
    }
    @Override
    public void onWindowFocusChanged(boolean b)
    {
        super.onWindowFocusChanged(b);
        H2EngineSDK.onWindowFocusChanged(b);
    }
    @Override
    protected void onNewIntent(Intent intent)
    {
        super.onNewIntent(intent);
        H2EngineSDK.onNewIntent(this, intent);
        LogUtil.i(TAG, "onNewIntent");
    }
    @Override
@@ -61,7 +67,6 @@
        H2EngineSDK.onConfigurationChanged(newConfig);
        super.onConfigurationChanged(newConfig);
        LogUtil.i(TAG, "onConfigurationChanged");
    }
    @Override
@@ -70,7 +75,6 @@
        H2EngineSDK.onStart(this);
        super.onStart();
        LogUtil.i(TAG, "onStart");
    }
    @Override
@@ -80,7 +84,6 @@
        H2EngineSDK.onStop(this);
        super.onStop();
        LogUtil.i(TAG, "onStop");
    }
    @Override
@@ -90,7 +93,6 @@
        H2EngineSDK.onResume(this);
        super.onResume();
        LogUtil.i(TAG, "onResume");
        // 检测本地存储权限是否有, 没有的话要提示用户
        if (PermissionChecker.checkPermission(this,
@@ -143,7 +145,6 @@
        H2EngineSDK.onPause(this);
        super.onPause();
        LogUtil.i(TAG, "onPause");
    }
    @Override
@@ -152,7 +153,6 @@
        H2EngineSDK.onDestroy(this);
        super.onDestroy();
        LogUtil.i(TAG, "onDestroy");
    }
    @Override
@@ -161,7 +161,6 @@
        H2EngineSDK.onRestart(this);
        super.onRestart();
        LogUtil.i(TAG, "onRestart");
    }
}