From b09a15acd68ac1257f466b46e96d9132b6a0f85d Mon Sep 17 00:00:00 2001
From: allez <305670599@qq.com>
Date: 星期四, 18 三月 2021 17:51:53 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/U3DRepository

---
 Channel/Android/gtgame/release/libs/library-release-gtgame.aar                    |    0 
 Channel/Android/test/release/libs/library-release-test.aar                        |    0 
 Channel/Android/qkbt2game/AndroidManifest.xml                                     |   20 +
 SdkProject/library/build.gradle                                                   |    5 
 Channel/Android/test/debug/libs/library-debug-test.aar                            |    0 
 SdkProject/library/src/main/java/com/secondworld/sdk/command/CmdGoToAppStore.java |   51 ++++
 SdkProject/channel/test/java/com/secondworld/sdk/TestApp.java                     |   11 
 Channel/Android/gtgame/AndroidManifest.xml                                        |   17 +
 /dev/null                                                                         |  511 ----------------------------------------------
 Channel/Android/gtgame/debug/libs/library-debug-gtgame.aar                        |    0 
 SdkProject/library/src/main/java/com/secondworld/sdk/utils/CodeU2A.java           |    4 
 Channel/Android/test/AndroidManifest.xml                                          |   17 +
 SdkProject/channel/GTGame/libs/fjsanxia_syh5_1.1.5.jar                            |    0 
 SdkProject/library/src/main/java/com/secondworld/sdk/GameActivity.java            |    1 
 14 files changed, 121 insertions(+), 516 deletions(-)

diff --git a/Channel/Android/gtgame/AndroidManifest.xml b/Channel/Android/gtgame/AndroidManifest.xml
new file mode 100644
index 0000000..6068870
--- /dev/null
+++ b/Channel/Android/gtgame/AndroidManifest.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN-->
+<manifest
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.unity3d.player"
+    xmlns:tools="http://schemas.android.com/tools">
+    <application>
+        <activity android:name="com.secondworld.sdk.GameActivity"
+                  android:theme="@style/UnityThemeSelector">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+            <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
+        </activity>
+    </application>
+</manifest>
diff --git a/Channel/Android/gtgame/debug/libs/library-debug-gtgame.aar b/Channel/Android/gtgame/debug/libs/library-debug-gtgame.aar
index 2834ed1..9ff2363 100644
--- a/Channel/Android/gtgame/debug/libs/library-debug-gtgame.aar
+++ b/Channel/Android/gtgame/debug/libs/library-debug-gtgame.aar
Binary files differ
diff --git a/Channel/Android/gtgame/release/libs/library-release-gtgame.aar b/Channel/Android/gtgame/release/libs/library-release-gtgame.aar
index 48e943f..bdd48df 100644
--- a/Channel/Android/gtgame/release/libs/library-release-gtgame.aar
+++ b/Channel/Android/gtgame/release/libs/library-release-gtgame.aar
Binary files differ
diff --git a/Channel/Android/qkbt2game/AndroidManifest.xml b/Channel/Android/qkbt2game/AndroidManifest.xml
new file mode 100644
index 0000000..639ebb5
--- /dev/null
+++ b/Channel/Android/qkbt2game/AndroidManifest.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN-->
+<manifest
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.unity3d.player"
+    xmlns:tools="http://schemas.android.com/tools">
+    <application>
+        <activity android:name="com.secondworld.sdk.SplashActivity">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+
+         <activity android:name="com.secondworld.sdk.GameActivity"
+                  android:theme="@style/UnityThemeSelector">
+            <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
+         </activity>
+    </application>
+</manifest>
diff --git a/Channel/Android/test/AndroidManifest.xml b/Channel/Android/test/AndroidManifest.xml
new file mode 100644
index 0000000..6068870
--- /dev/null
+++ b/Channel/Android/test/AndroidManifest.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN-->
+<manifest
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.unity3d.player"
+    xmlns:tools="http://schemas.android.com/tools">
+    <application>
+        <activity android:name="com.secondworld.sdk.GameActivity"
+                  android:theme="@style/UnityThemeSelector">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+            <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
+        </activity>
+    </application>
+</manifest>
diff --git a/Channel/Android/test/debug/libs/library-debug-test.aar b/Channel/Android/test/debug/libs/library-debug-test.aar
index 7472515..86a094c 100644
--- a/Channel/Android/test/debug/libs/library-debug-test.aar
+++ b/Channel/Android/test/debug/libs/library-debug-test.aar
Binary files differ
diff --git a/Channel/Android/test/release/libs/library-release-test.aar b/Channel/Android/test/release/libs/library-release-test.aar
index bab69a5..c7cbc4b 100644
--- a/Channel/Android/test/release/libs/library-release-test.aar
+++ b/Channel/Android/test/release/libs/library-release-test.aar
Binary files differ
diff --git a/Channel/IOS/qkbt2game/UnityAppController.mm b/Channel/IOS/qkbt2game/UnityAppController.mm
deleted file mode 100644
index d9f1059..0000000
--- a/Channel/IOS/qkbt2game/UnityAppController.mm
+++ /dev/null
@@ -1,511 +0,0 @@
-#import "UnityAppController.h"
-#import "UnityAppController+ViewHandling.h"
-#import "UnityAppController+Rendering.h"
-#import "iPhone_Sensors.h"
-
-#import <CoreGraphics/CoreGraphics.h>
-#import <QuartzCore/QuartzCore.h>
-#import <QuartzCore/CADisplayLink.h>
-#import <Availability.h>
-
-#import <OpenGLES/EAGL.h>
-#import <OpenGLES/EAGLDrawable.h>
-#import <OpenGLES/ES2/gl.h>
-#import <OpenGLES/ES2/glext.h>
-
-#include <mach/mach_time.h>
-
-// MSAA_DEFAULT_SAMPLE_COUNT was moved to iPhone_GlesSupport.h
-// ENABLE_INTERNAL_PROFILER and related defines were moved to iPhone_Profiler.h
-// kFPS define for removed: you can use Application.targetFrameRate (30 fps by default)
-// DisplayLink is the only run loop mode now - all others were removed
-
-#include "CrashReporter.h"
-
-#include "UI/OrientationSupport.h"
-#include "UI/UnityView.h"
-#include "UI/Keyboard.h"
-#include "UI/SplashScreen.h"
-#include "Unity/InternalProfiler.h"
-#include "Unity/DisplayManager.h"
-#include "Unity/EAGLContextHelper.h"
-#include "Unity/GlesHelper.h"
-#include "Unity/ObjCRuntime.h"
-#include "PluginBase/AppDelegateListener.h"
-#include "UniversalSDK.h"
-
-#import <SMPCQuickSDK/SMPCQuickSDK.h>
-
-
-#include <objc/objc.h>
-#include <objc/runtime.h>
-
-// Set this to 1 to force single threaded rendering
-#define UNITY_FORCE_DIRECT_RENDERING 0
-
-// Standard Gesture Recognizers enabled on all iOS apps absorb touches close to the top and bottom of the screen.
-// This sometimes causes an ~1 second delay before the touch is handled when clicking very close to the edge.
-// You should enable this if you want to avoid that delay. Enabling it should not have any effect on default iOS gestures.
-#define DISABLE_TOUCH_DELAYS 1
-
-bool    _ios42orNewer           = false;
-bool    _ios43orNewer           = false;
-bool    _ios50orNewer           = false;
-bool    _ios60orNewer           = false;
-bool    _ios70orNewer           = false;
-bool    _ios80orNewer           = false;
-bool    _ios81orNewer           = false;
-bool    _ios82orNewer           = false;
-bool    _ios83orNewer           = false;
-bool    _ios90orNewer           = false;
-bool    _ios91orNewer           = false;
-bool    _ios100orNewer          = false;
-
-// was unity rendering already inited: we should not touch rendering while this is false
-bool    _renderingInited        = false;
-// was unity inited: we should not touch unity api while this is false
-bool    _unityAppReady          = false;
-// see if there's a need to do internal player pause/resume handling
-//
-// Typically the trampoline code should manage this internally, but
-// there are use cases, videoplayer, plugin code, etc where the player
-// is paused before the internal handling comes relevant. Avoid
-// overriding externally managed player pause/resume handling by
-// caching the state
-bool    _wasPausedExternal      = false;
-// should we skip present on next draw: used in corner cases (like rotation) to fill both draw-buffers with some content
-bool    _skipPresent            = false;
-// was app "resigned active": some operations do not make sense while app is in background
-bool    _didResignActive        = false;
-
-// was startUnity scheduled: used to make startup robust in case of locking device
-static bool _startUnityScheduled    = false;
-
-bool    _supportsMSAA           = false;
-
-
-@implementation UnityAppController
-
-@synthesize unityView               = _unityView;
-@synthesize unityDisplayLink        = _unityDisplayLink;
-
-@synthesize rootView                = _rootView;
-@synthesize rootViewController      = _rootController;
-@synthesize mainDisplay             = _mainDisplay;
-@synthesize renderDelegate          = _renderDelegate;
-@synthesize quitHandler             = _quitHandler;
-
-#if !UNITY_TVOS
-@synthesize interfaceOrientation    = _curOrientation;
-#endif
-
-- (id)init
-{
-    if ((self = [super init]))
-    {
-        // due to clang issues with generating warning for overriding deprecated methods
-        // we will simply assert if deprecated methods are present
-        // NB: methods table is initied at load (before this call), so it is ok to check for override
-        NSAssert(![self respondsToSelector: @selector(createUnityViewImpl)],
-            @"createUnityViewImpl is deprecated and will not be called. Override createUnityView"
-            );
-        NSAssert(![self respondsToSelector: @selector(createViewHierarchyImpl)],
-            @"createViewHierarchyImpl is deprecated and will not be called. Override willStartWithViewController"
-            );
-        NSAssert(![self respondsToSelector: @selector(createViewHierarchy)],
-            @"createViewHierarchy is deprecated and will not be implemented. Use createUI"
-            );
-    }
-    return self;
-}
-
-- (void)setWindow:(id)object        {}
-- (UIWindow*)window                 { return _window; }
-
-
-- (void)shouldAttachRenderDelegate  {}
-- (void)preStartUnity               {}
-
-
-- (void)startUnity:(UIApplication*)application
-{
-    NSAssert(_unityAppReady == NO, @"[UnityAppController startUnity:] called after Unity has been initialized");
-
-    UnityInitApplicationGraphics(UNITY_FORCE_DIRECT_RENDERING);
-
-    // we make sure that first level gets correct display list and orientation
-    [[DisplayManager Instance] updateDisplayListInUnity];
-
-    UnityLoadApplication();
-    Profiler_InitProfiler();
-
-    [self showGameUI];
-    [self createDisplayLink];
-
-    UnitySetPlayerFocus(1);
-}
-
-extern "C" void UnityDestroyDisplayLink()
-{
-    [GetAppController() destroyDisplayLink];
-}
-
-extern "C" void UnityRequestQuit()
-{
-    _didResignActive = true;
-    if (GetAppController().quitHandler)
-        GetAppController().quitHandler();
-    else
-        exit(0);
-}
-
-#if !UNITY_TVOS
-- (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window
-{
-    // UIInterfaceOrientationMaskAll
-    // it is the safest way of doing it:
-    // - GameCenter and some other services might have portrait-only variant
-    //     and will throw exception if portrait is not supported here
-    // - When you change allowed orientations if you end up forbidding current one
-    //     exception will be thrown
-    // Anyway this is intersected with values provided from UIViewController, so we are good
-    
-    [[SMPCQuickSDK defaultInstance] application:application supportedInterfaceOrientationsForWindow:window];
-    
-    return (1 << UIInterfaceOrientationPortrait) | (1 << UIInterfaceOrientationPortraitUpsideDown)
-        | (1 << UIInterfaceOrientationLandscapeRight) | (1 << UIInterfaceOrientationLandscapeLeft);
-}
-
-#endif
-
-#if !UNITY_TVOS
-- (void)application:(UIApplication*)application didReceiveLocalNotification:(UILocalNotification*)notification
-{
-    AppController_SendNotificationWithArg(kUnityDidReceiveLocalNotification, notification);
-    UnitySendLocalNotification(notification);
-}
-
-#endif
-
-#if UNITY_USES_REMOTE_NOTIFICATIONS
-- (void)application:(UIApplication*)application didReceiveRemoteNotification:(NSDictionary*)userInfo
-{
-    AppController_SendNotificationWithArg(kUnityDidReceiveRemoteNotification, userInfo);
-    UnitySendRemoteNotification(userInfo);
-    [[SMPCQuickSDK defaultInstance] application:application didReceiveRemoteNotification:userInfo];
-}
-
-- (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
-{
-    AppController_SendNotificationWithArg(kUnityDidRegisterForRemoteNotificationsWithDeviceToken, deviceToken);
-    UnitySendDeviceToken(deviceToken);
-    [[SMPCQuickSDK defaultInstance] application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
-}
-
-#if !UNITY_TVOS
-- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))handler
-{
-    AppController_SendNotificationWithArg(kUnityDidReceiveRemoteNotification, userInfo);
-    UnitySendRemoteNotification(userInfo);
-
-    if (handler)
-    {
-        handler(UIBackgroundFetchResultNoData);
-    }
-}
-
-#endif
-
-- (void)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error
-{
-    AppController_SendNotificationWithArg(kUnityDidFailToRegisterForRemoteNotificationsWithError, error);
-    UnitySendRemoteNotificationError(error);
-    [[SMPCQuickSDK defaultInstance] application:application didFailToRegisterForRemoteNotificationsWithError:error];
-}
-
-#endif
-
-- (BOOL)application:(UIApplication*)application openURL:(NSURL*)url sourceApplication:(NSString*)sourceApplication annotation:(id)annotation
-{
-    [[SMPCQuickSDK defaultInstance] openURL:url sourceApplication:sourceApplication application:application annotation:annotation];
-    NSMutableArray* keys    = [NSMutableArray arrayWithCapacity: 3];
-    NSMutableArray* values  = [NSMutableArray arrayWithCapacity: 3];
-
-    #define ADD_ITEM(item)  do{ if(item) {[keys addObject:@#item]; [values addObject:item];} }while(0)
-
-    ADD_ITEM(url);
-    ADD_ITEM(sourceApplication);
-    ADD_ITEM(annotation);
-
-    #undef ADD_ITEM
-
-    NSDictionary* notifData = [NSDictionary dictionaryWithObjects: values forKeys: keys];
-    AppController_SendNotificationWithArg(kUnityOnOpenURL, notifData);
-    return YES;
-}
-
-- (BOOL)application:(UIApplication*)application willFinishLaunchingWithOptions:(NSDictionary*)launchOptions
-{
-    return YES;
-}
-
-- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
-{
-    ::printf("-> applicationDidFinishLaunching()\n");
-
-    // send notfications
-#if !UNITY_TVOS
-    if (UILocalNotification* notification = [launchOptions objectForKey: UIApplicationLaunchOptionsLocalNotificationKey])
-        UnitySendLocalNotification(notification);
-
-    if ([UIDevice currentDevice].generatesDeviceOrientationNotifications == NO)
-        [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
-#endif
-
-    UnityInitApplicationNoGraphics([[[NSBundle mainBundle] bundlePath] UTF8String]);
-
-    [self selectRenderingAPI];
-    [UnityRenderingView InitializeForAPI: self.renderingAPI];
-
-        CGRect _winSize = [UIScreen mainScreen].bounds;
-    if(KIsiPhoneX){
-        _winSize.origin.x = 40;
-        _winSize.size.width -= 92;
-        _winSize.size.height -= 15;
-    }
-    _window = [[UIWindow alloc] initWithFrame:_winSize];
-
-    _unityView      = [self createUnityView];
-
-    [DisplayManager Initialize];
-    _mainDisplay    = [DisplayManager Instance].mainDisplay;
-    [_mainDisplay createWithWindow: _window andView: _unityView];
-
-    [self createUI];
-    [self preStartUnity];
-
-    // if you wont use keyboard you may comment it out at save some memory
-    [KeyboardDelegate Initialize];
-
-    _universalSDK = [[UniversalSDK alloc] init];
-    [_universalSDK QuickSDKInit:application didFinishLaunchingWithOptions:launchOptions];
-
-
-#if !PLATFORM_TVOS && DISABLE_TOUCH_DELAYS
-    for (UIGestureRecognizer *g in _window.gestureRecognizers)
-    {
-        g.delaysTouchesBegan = false;
-    }
-#endif
-
-    return YES;
-}
-
-- (void)applicationDidEnterBackground:(UIApplication*)application
-{
-    ::printf("-> applicationDidEnterBackground()\n");
-    [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
-    [[SMPCQuickSDK defaultInstance] applicationDidEnterBackground:application];
-}
-
-- (void)applicationWillEnterForeground:(UIApplication*)application
-{
-    ::printf("-> applicationWillEnterForeground()\n");
-    [application setApplicationIconBadgeNumber:0];
-    [application cancelAllLocalNotifications];
-    [[SMPCQuickSDK defaultInstance] applicationWillEnterForeground:application];
-
-    // applicationWillEnterForeground: might sometimes arrive *before* actually initing unity (e.g. locking on startup)
-    if (_unityAppReady)
-    {
-        // if we were showing video before going to background - the view size may be changed while we are in background
-        [GetAppController().unityView recreateGLESSurfaceIfNeeded];
-    }
-}
-
-- (void)applicationDidBecomeActive:(UIApplication*)application
-{
-    ::printf("-> applicationDidBecomeActive()\n");
-
-    [self removeSnapshotView];
-
-    if (_unityAppReady)
-    {
-        if (UnityIsPaused() && _wasPausedExternal == false)
-        {
-            UnityWillResume();
-            UnityPause(0);
-        }
-        if (_wasPausedExternal)
-        {
-            if (UnityIsFullScreenPlaying())
-                TryResumeFullScreenVideo();
-        }
-        UnitySetPlayerFocus(1);
-    }
-    else if (!_startUnityScheduled)
-    {
-        _startUnityScheduled = true;
-        [self performSelector: @selector(startUnity:) withObject: application afterDelay: 0];
-    }
-
-    _didResignActive = false;
-    [[SMPCQuickSDK defaultInstance] applicationDidBecomeActive:application];
-}
-
-- (void)removeSnapshotView
-{
-    // do this on the main queue async so that if we try to create one
-    // and remove in the same frame, this always happens after in the same queue
-    dispatch_async(dispatch_get_main_queue(), ^{
-        if (_snapshotView)
-        {
-            [_snapshotView removeFromSuperview];
-            _snapshotView = nil;
-        }
-    });
-}
-
-- (void)applicationWillResignActive:(UIApplication*)application
-{
-    ::printf("-> applicationWillResignActive()\n");
-
-    if (_unityAppReady)
-    {
-        UnitySetPlayerFocus(0);
-
-        _wasPausedExternal = UnityIsPaused();
-        if (_wasPausedExternal == false)
-        {
-            // do pause unity only if we dont need special background processing
-            // otherwise batched player loop can be called to run user scripts
-            int bgBehavior = UnityGetAppBackgroundBehavior();
-            if (bgBehavior == appbgSuspend || bgBehavior == appbgExit)
-            {
-                // Force player to do one more frame, so scripts get a chance to render custom screen for minimized app in task manager.
-                // NB: UnityWillPause will schedule OnApplicationPause message, which will be sent normally inside repaint (unity player loop)
-                // NB: We will actually pause after the loop (when calling UnityPause).
-                UnityWillPause();
-                [self repaint];
-                UnityPause(1);
-
-                // this is done on the next frame so that
-                // in the case where unity is paused while going
-                // into the background and an input is deactivated
-                // we don't mess with the view hierarchy while taking
-                // a view snapshot (case 760747).
-                dispatch_async(dispatch_get_main_queue(), ^{
-                    // if we are active again, we don't need to do this anymore
-                    if (!_didResignActive)
-                    {
-                        return;
-                    }
-
-                    _snapshotView = [self createSnapshotView];
-                    if (_snapshotView)
-                        [_rootView addSubview: _snapshotView];
-                });
-            }
-        }
-    }
-
-    _didResignActive = true;
-    
-    [[SMPCQuickSDK defaultInstance] applicationWillResignActive:application];
-}
-
-- (void)applicationDidReceiveMemoryWarning:(UIApplication*)application
-{
-    ::printf("WARNING -> applicationDidReceiveMemoryWarning()\n");
-    UnityLowMemory();
-}
-
-- (void)applicationWillTerminate:(UIApplication*)application
-{
-    ::printf("-> applicationWillTerminate()\n");
-    [[SMPCQuickSDK defaultInstance] applicationWillTerminate:application];
-    
-    Profiler_UninitProfiler();
-    UnityCleanup();
-
-    extern void SensorsCleanup();
-    SensorsCleanup();
-}
-
-@end
-
-
-void AppController_SendNotification(NSString* name)
-{
-    [[NSNotificationCenter defaultCenter] postNotificationName: name object: GetAppController()];
-}
-
-void AppController_SendNotificationWithArg(NSString* name, id arg)
-{
-    [[NSNotificationCenter defaultCenter] postNotificationName: name object: GetAppController() userInfo: arg];
-}
-
-void AppController_SendUnityViewControllerNotification(NSString* name)
-{
-    [[NSNotificationCenter defaultCenter] postNotificationName: name object: UnityGetGLViewController()];
-}
-
-extern "C" UIWindow*            UnityGetMainWindow()        {
-    return GetAppController().mainDisplay.window;
-}
-extern "C" UIViewController*    UnityGetGLViewController()  {
-    return GetAppController().rootViewController;
-}
-extern "C" UIView*              UnityGetGLView()            {
-    return GetAppController().unityView;
-}
-extern "C" ScreenOrientation    UnityCurrentOrientation()   { return GetAppController().unityView.contentOrientation; }
-
-extern "C" void IOSMessageHandle(const char* jsonString) {
-    [GetAppController().universalSDK HandleUnityMessage:[NSString stringWithUTF8String:jsonString]];
-}
-
-
-
-bool LogToNSLogHandler(LogType logType, const char* log, va_list list)
-{
-    NSLogv([NSString stringWithUTF8String: log], list);
-    return true;
-}
-
-void UnityInitTrampoline()
-{
-#if ENABLE_CRASH_REPORT_SUBMISSION
-    SubmitCrashReportsAsync();
-#endif
-    InitCrashHandling();
-
-    NSString* version = [[UIDevice currentDevice] systemVersion];
-
-    // keep native plugin developers happy and keep old bools around
-    _ios42orNewer = true;
-    _ios43orNewer = true;
-    _ios50orNewer = true;
-    _ios60orNewer = true;
-    _ios70orNewer = [version compare: @"7.0" options: NSNumericSearch] != NSOrderedAscending;
-    _ios80orNewer = [version compare: @"8.0" options: NSNumericSearch] != NSOrderedAscending;
-    _ios81orNewer = [version compare: @"8.1" options: NSNumericSearch] != NSOrderedAscending;
-    _ios82orNewer = [version compare: @"8.2" options: NSNumericSearch] != NSOrderedAscending;
-    _ios83orNewer = [version compare: @"8.3" options: NSNumericSearch] != NSOrderedAscending;
-    _ios90orNewer = [version compare: @"9.0" options: NSNumericSearch] != NSOrderedAscending;
-    _ios91orNewer = [version compare: @"9.1" options: NSNumericSearch] != NSOrderedAscending;
-    _ios100orNewer = [version compare: @"10.0" options: NSNumericSearch] != NSOrderedAscending;
-
-    // Try writing to console and if it fails switch to NSLog logging
-    ::fprintf(stdout, "\n");
-    if (::ftell(stdout) < 0)
-        UnitySetLogEntryHandler(LogToNSLogHandler);
-
-    if (![[UIView class] instancesRespondToSelector: @selector(safeAreaInsets)])
-    {
-        IMP UIView_SafeAreaInsets_IMP = imp_implementationWithBlock(^UIEdgeInsets(id _self) {
-            return UIEdgeInsetsZero;
-        });
-        class_replaceMethod([UIView class], @selector(safeAreaInsets), UIView_SafeAreaInsets_IMP, UIView_safeAreaInsets_Enc);
-    }
-}
diff --git a/SdkProject/channel/GTGame/libs/fjsanxia_syh5_1.1.4.jar b/SdkProject/channel/GTGame/libs/fjsanxia_syh5_1.1.5.jar
similarity index 76%
rename from SdkProject/channel/GTGame/libs/fjsanxia_syh5_1.1.4.jar
rename to SdkProject/channel/GTGame/libs/fjsanxia_syh5_1.1.5.jar
index 587b88e..d48f71a 100644
--- a/SdkProject/channel/GTGame/libs/fjsanxia_syh5_1.1.4.jar
+++ b/SdkProject/channel/GTGame/libs/fjsanxia_syh5_1.1.5.jar
Binary files differ
diff --git a/SdkProject/channel/test/java/com/secondworld/sdk/TestApp.java b/SdkProject/channel/test/java/com/secondworld/sdk/TestApp.java
index a44efc6..3a7f0e1 100644
--- a/SdkProject/channel/test/java/com/secondworld/sdk/TestApp.java
+++ b/SdkProject/channel/test/java/com/secondworld/sdk/TestApp.java
@@ -1,9 +1,14 @@
 package com.secondworld.sdk;
 
-public class TestApp extends GameApp {
+import android.app.Application;
+
+public class TestApp extends Application {
 
     @Override
-    protected void initPlatformDiff(){
-        PlatformDiff.I = new TestPlatform();
+    public void onCreate() {
+        super.onCreate();
+        GameAppProxy.create(this,new TestPlatform());
+        GameActivity.registerProxy(GameActivityProxy.class);
     }
+
 }
diff --git a/SdkProject/library/build.gradle b/SdkProject/library/build.gradle
index f7a0d8a..968251b 100644
--- a/SdkProject/library/build.gradle
+++ b/SdkProject/library/build.gradle
@@ -138,7 +138,8 @@
 }
 
 task deleteSdk() {
-    delete "${outPutPath}\\${CHANNEL_NAME}"
+    delete "${outPutPath}\\${CHANNEL_NAME}\\debug"
+    delete "${outPutPath}\\${CHANNEL_NAME}\\release"
 }
 
 //鎵ц鎵撳寘浠诲姟浠ュ強鎷疯礉鍒板閮�
@@ -171,6 +172,8 @@
     def dir = new File("${outPutPath}\\${CHANNEL_NAME}")
     def libraries = new File("${outPutPath}\\${CHANNEL_NAME}\\deps.gradle")
     dir.mkdir()
+    if (libraries.exists())
+        libraries.delete()
     if (!libraries.exists())
         libraries.createNewFile()
     libraries.text = content
diff --git a/SdkProject/library/src/main/java/com/secondworld/sdk/GameActivity.java b/SdkProject/library/src/main/java/com/secondworld/sdk/GameActivity.java
index 0181734..60f3663 100644
--- a/SdkProject/library/src/main/java/com/secondworld/sdk/GameActivity.java
+++ b/SdkProject/library/src/main/java/com/secondworld/sdk/GameActivity.java
@@ -4,7 +4,6 @@
 import android.os.Bundle;
 import android.support.annotation.NonNull;
 import android.view.KeyEvent;
-import android.webkit.WebView;
 import android.widget.FrameLayout;
 import android.widget.RelativeLayout;
 
diff --git a/SdkProject/library/src/main/java/com/secondworld/sdk/command/CmdGoToAppStore.java b/SdkProject/library/src/main/java/com/secondworld/sdk/command/CmdGoToAppStore.java
new file mode 100644
index 0000000..b9f97e0
--- /dev/null
+++ b/SdkProject/library/src/main/java/com/secondworld/sdk/command/CmdGoToAppStore.java
@@ -0,0 +1,51 @@
+package com.secondworld.sdk.command;
+
+import android.content.ActivityNotFoundException;
+import android.content.Intent;
+import android.net.Uri;
+import android.text.TextUtils;
+
+import com.secondworld.sdk.GameActivityProxy;
+import com.secondworld.sdk.GameAppProxy;
+import com.secondworld.sdk.utils.CodeU2A;
+
+import org.json.JSONObject;
+
+public class CmdGoToAppStore implements ICommand {
+    @Override
+    public int getCode() {
+        return CodeU2A.GoToAppStore;
+    }
+
+    @Override
+    public void process(JSONObject json) throws Exception {
+        String url = "";
+        if (json.has("url"))
+            url = json.getString("url");
+
+        String marketPkg="";
+        if(json.has("marketPkg"))
+            marketPkg=json.getString("marketPkg");
+
+        Uri uri = Uri.parse("market://details?id=" + GameAppProxy.app.getPackageName());
+        Intent intent = new Intent(Intent.ACTION_VIEW, uri);
+
+        intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY |
+                Intent.FLAG_ACTIVITY_NEW_DOCUMENT |
+                Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
+
+        if (!TextUtils.isEmpty(marketPkg)) {
+            intent.setPackage(marketPkg);
+        }
+
+        if (GameActivityProxy.I.activity == null)
+            return;
+
+        try {
+            GameActivityProxy.I.activity.startActivity(intent);
+        } catch (ActivityNotFoundException e) {
+            if (!TextUtils.isEmpty(url))
+                GameActivityProxy.I.activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
+        }
+    }
+}
diff --git a/SdkProject/library/src/main/java/com/secondworld/sdk/utils/CodeU2A.java b/SdkProject/library/src/main/java/com/secondworld/sdk/utils/CodeU2A.java
index ae1d765..21143e5 100644
--- a/SdkProject/library/src/main/java/com/secondworld/sdk/utils/CodeU2A.java
+++ b/SdkProject/library/src/main/java/com/secondworld/sdk/utils/CodeU2A.java
@@ -58,6 +58,10 @@
      */
     int CopyOneAsset = 12;
 
+    /**
+     * 鎵撳紑搴旂敤鍟嗗簵鍦板潃
+     */
+    int GoToAppStore=13;
 
     /**
      * 姣忎釜娓犻亾Sdk鐩稿叧

--
Gitblit v1.8.0