client_Hale
2018-09-07 e55e2c63390a5140ac6eae581703ff80b959f6a4
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);