File was renamed from Project/app/src/game_498mrgame/java/com/secondworld/univeralsdk/H2EngineSDK.java |
| | |
| | | public class H2EngineSDK |
| | | { |
| | | private static final String TAG = "H2EngineSDK"; |
| | | private static String APP_ID = ""; |
| | | |
| | | public static void HandleUnityMessage(String json) |
| | | { |
| | |
| | | switch (_code) |
| | | { |
| | | case CodeU2A.Init: |
| | | APP_ID = _json.getString("appID"); |
| | | init(_activity); |
| | | break; |
| | | case CodeU2A.AssetCopy: |
| | |
| | | MrPlatformUtil.getInstance().logout(_activity); |
| | | break; |
| | | case CodeU2A.FreePlatformPay: |
| | | String _appID = UniversalUtil.getMetaString(_activity, "Mr_GAME_ID"); |
| | | _appID = _appID.replace("_", "") + "mrgame"; |
| | | |
| | | JSONObject _extraData = new JSONObject(); |
| | | _extraData.put("appid", _appID); |
| | | _extraData.put("appid", APP_ID); |
| | | _extraData.put("cpinfo", _json.getString("cpInfo")); |
| | | _extraData.put("cporderid", _json.getString("orderId")); |
| | | |