| | |
| | | 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")); |
| | | |
| | |
| | | _json.getString("notifyurl")); |
| | | |
| | | MrPlatformUtil.getInstance().payProcessing = true; |
| | | |
| | | break; |
| | | case CodeU2A.PayFinished: |
| | | MrPlatformUtil.getInstance().payProcessing = false; |
| | |
| | | |
| | | _msgStruct.clear(); |
| | | _msgStruct.put("code", CodeA2U.SdkInitComplete); |
| | | _msgStruct.put("channelPlatform","mr"); |
| | | _msgStruct.put("channelPlatform", "mr"); |
| | | UniversalUtil.sendMessageToUnity(_msgStruct); |
| | | |
| | | LogUtil.i(TAG, "初始化执行完毕"); |
| | |
| | | { |
| | | // ------------------------------- 猫耳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) |
| | |
| | | |
| | | public static void onStart(final Activity activity) |
| | | { |
| | | |
| | | } |
| | | |
| | | public static void onPause(final Activity activity) |
| | |
| | | { |
| | | CommonMrSdk.getInstance().onResume(activity); |
| | | |
| | | if(MrPlatformUtil.getInstance().payProcessing) |
| | | if (MrPlatformUtil.getInstance().payProcessing) |
| | | { |
| | | Map<String, Object> _msgStruct = new HashMap<>(); |
| | | _msgStruct.put("code", CodeA2U.FreePlatformPayCancel); |