| | |
| | | case CodeU2A.AssetCopy: |
| | | FileUtil.copyAssets(_activity); |
| | | break; |
| | | case CodeU2A.CopyOneAsset: |
| | | FileUtil.copy(_activity, _json.getString("fileName")); |
| | | break; |
| | | case CodeU2A.BatteryListenStart: |
| | | BatteryUtil.getInstance().start(_activity); |
| | | break; |
| | |
| | | _json.getString("orderId"), |
| | | (float) _json.getDouble("mount"), |
| | | _json.getString("cpInfo")); |
| | | FreePlatformUtil.getInstace().payProcessing = true; |
| | | break; |
| | | case CodeU2A.PayFinished: |
| | | Tracking.setPayment(_json.getString("orderID"), |
| | |
| | | _json.getString("moneyType"), |
| | | true, |
| | | _money); |
| | | |
| | | FreePlatformUtil.getInstace().payProcessing = false; |
| | | |
| | | break; |
| | | case CodeU2A.ClientPackage: |
| | | // 初始化热云 |
| | |
| | | break; |
| | | case CodeU2A.JPushRemoveLocalMessage: |
| | | removeNotification(_activity, _json.getInt("id")); |
| | | break; |
| | | case CodeU2A.SendRegistEvent: |
| | | FreePlatformUtil.getInstace().SendRegisterEvent(); |
| | | break; |
| | | } |
| | | |
| | |
| | | |
| | | // ------------------------------- 自由SDK ------------------------------- |
| | | FreePlatformUtil.getInstace().init(activity); |
| | | |
| | | // ------------------------------- 猫耳SDK ------------------------------- |
| | | FreePlatformUtil.getInstace().init(activity); |
| | | // ------------------------------- 极光推送 ------------------------------- |
| | | JPushInterface.setDebugMode(true); |
| | | JPushInterface.init(activity); |
| | |
| | | FreePlatform.getInstance().onCreate(); |
| | | } |
| | | |
| | | public static void onWindowFocusChanged(boolean b) |
| | | { |
| | | } |
| | | |
| | | public static void onNewIntent(final Activity activity, final Intent intent) |
| | | { |
| | | } |
| | |
| | | { |
| | | FreePlatform.getInstance().onResume(); |
| | | TeaAgent.onResume(activity); |
| | | |
| | | if(FreePlatformUtil.getInstace().payProcessing) |
| | | { |
| | | Map<String, Object> _msgStruct = new HashMap<>(); |
| | | _msgStruct.put("code", CodeA2U.FreePlatformPayCancel); |
| | | UniversalUtil.sendMessageToUnity(_msgStruct); |
| | | FreePlatformUtil.getInstace().payProcessing = false; |
| | | } |
| | | } |
| | | |
| | | public static void onStop(final Activity activity) |