|  |  | 
 |  |  | import android.content.Context; | 
 |  |  | import android.content.DialogInterface; | 
 |  |  | import android.content.Intent; | 
 |  |  | import android.content.pm.ApplicationInfo; | 
 |  |  | import android.content.pm.PackageManager; | 
 |  |  | import android.content.res.Configuration; | 
 |  |  | import android.net.Uri; | 
 |  |  | import android.os.Build; | 
 |  |  | import android.os.Bundle; | 
 |  |  | import android.os.Environment; | 
 |  |  | import android.provider.Settings; | 
 |  |  | import android.support.v4.content.FileProvider; | 
 |  |  | import android.widget.Toast; | 
 |  |  |  | 
 |  |  | import com.allugame.freesdk.port.FreePlatform; | 
 |  |  | 
 |  |  | import org.json.JSONException; | 
 |  |  | import org.json.JSONObject; | 
 |  |  |  | 
 |  |  | import java.io.BufferedReader; | 
 |  |  | import java.io.File; | 
 |  |  | import java.io.IOException; | 
 |  |  | import java.io.InputStreamReader; | 
 |  |  | import java.net.URL; | 
 |  |  | import java.net.URLConnection; | 
 |  |  | import java.util.HashMap; | 
 |  |  | import java.util.Map; | 
 |  |  |  | 
 |  |  | 
 |  |  |                     break; | 
 |  |  |                 case CodeU2A.AssetCopy: | 
 |  |  |                     FileUtil.copyAssets(_activity); | 
 |  |  |                     break; | 
 |  |  |                 case CodeU2A.CopyOneAsset: | 
 |  |  |                     FileUtil.copy(_activity, _json.getString("fileName")); | 
 |  |  |                     break; | 
 |  |  |                 case CodeU2A.BatteryListenStart: | 
 |  |  |                     BatteryUtil.getInstance().start(_activity); | 
 |  |  | 
 |  |  |                 case CodeU2A.RequestManifestPermissions: | 
 |  |  |                     break; | 
 |  |  |                 case CodeU2A.FreePlatformInit: | 
 |  |  |                     FreePlatformUtil.getInstace().init(_activity); | 
 |  |  |                     FreePlatformUtil.getInstance().init(_activity); | 
 |  |  |                     break; | 
 |  |  |                 case CodeU2A.FreePlatformLogin: | 
 |  |  |                     FreePlatformUtil.getInstace().login(_activity); | 
 |  |  |                     FreePlatformUtil.getInstance().login(_activity); | 
 |  |  |                     break; | 
 |  |  |                 case CodeU2A.FreePlatformSwitchAccount: | 
 |  |  |                     FreePlatformUtil.getInstace().switchAccount(_activity); | 
 |  |  |                     FreePlatformUtil.getInstance().switchAccount(_activity); | 
 |  |  |                     break; | 
 |  |  |                 case CodeU2A.FreePlatformLogout: | 
 |  |  |                     FreePlatformUtil.getInstace().logout(); | 
 |  |  |                     FreePlatformUtil.getInstance().logout(); | 
 |  |  |                     break; | 
 |  |  |                 case CodeU2A.FreePlatformPay: | 
 |  |  |                     FreePlatformUtil.getInstace().pay(_activity, | 
 |  |  |                                                       _json.getString("title"), | 
 |  |  |                                                       _json.getString("orderId"), | 
 |  |  |                                                       (float) _json.getDouble("mount"), | 
 |  |  |                                                       _json.getString("cpInfo")); | 
 |  |  |                     FreePlatformUtil.getInstance().pay(_activity, | 
 |  |  |                                                        _json.getString("title"), | 
 |  |  |                                                        _json.getString("orderId"), | 
 |  |  |                                                        (float) _json.getDouble("mount"), | 
 |  |  |                                                        _json.getString("cpInfo")); | 
 |  |  |                     break; | 
 |  |  |                 case CodeU2A.PayFinished: | 
 |  |  |                     Tracking.setPayment(_json.getString("orderID"), | 
 |  |  | 
 |  |  |                     break; | 
 |  |  |                 case CodeU2A.JPushRemoveLocalMessage: | 
 |  |  |                     removeNotification(_activity, _json.getInt("id")); | 
 |  |  |                     break; | 
 |  |  |                 case CodeU2A.SendRegistEvent: | 
 |  |  |                     FreePlatformUtil.getInstance().SendRegisterEvent(); | 
 |  |  |                     break; | 
 |  |  |             } | 
 |  |  |  | 
 |  |  | 
 |  |  |                 UniversalUtil.sendMessageToUnity(_msgStruct); | 
 |  |  |  | 
 |  |  |                 // ------------------------------- 自由SDK ------------------------------- | 
 |  |  |                 // FreePlatformUtil.getInstace().init(activity); | 
 |  |  |                 FreePlatformUtil.getInstance().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) | 
 |  |  |     { | 
 |  |  |     } |