From f21ed5989be4b3bfe4707c87b92d03236916d30d Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期三, 27 十二月 2023 11:18:30 +0800
Subject: [PATCH] 0312 测试
---
SdkProject/library/src/main/java/com/secondworld/sdk/GameActivity.java | 36 +++++++++++++++++++++++++++++-------
1 files changed, 29 insertions(+), 7 deletions(-)
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 5344302..c3fc094 100644
--- a/SdkProject/library/src/main/java/com/secondworld/sdk/GameActivity.java
+++ b/SdkProject/library/src/main/java/com/secondworld/sdk/GameActivity.java
@@ -10,7 +10,7 @@
import com.secondworld.sdk.utils.LogUtil;
import com.secondworld.sdk.utils.WebViewUtil;
-import com.soha.sdk.SohaSDK;
+import com.juefeng.sdk.juefengsdk.JFSDK;
public class GameActivity extends UnityPlayerActivity {
@@ -60,6 +60,8 @@
super.onRestart();
if (proxy != null)
proxy.onRestart();
+
+ JFSDK.getInstance().onRestart(GTGameMain.I.activity);
}
@Override
@@ -95,12 +97,7 @@
super.onNewIntent(intent);
if (proxy != null)
proxy.onNewIntent(intent);
- boolean isNotificationGame = intent.getBooleanExtra("action_notification_game_push", false);
-
- SohaSDK.getInstance().setClickNoti(isNotificationGame);
-
-
- SohaSDK.getInstance().trackingNotification(intent);
+ JFSDK.getInstance().onNewIntent(GTGameMain.I.activity, intent);
}
@Override
@@ -124,4 +121,29 @@
boolean b = proxy.onKeyDown(keyCode, event);
return b ? b : super.onKeyDown(keyCode, event);
}
+
+ @Override
+ public boolean dispatchKeyEvent(KeyEvent event) {
+ if(event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
+ if(event.getAction() == KeyEvent.ACTION_DOWN&&event.getRepeatCount() == 0) {
+ JFSDK.getInstance().exitLogin(GTGameMain.I.activity);
+ return true;
+ }
+ }
+ return super.dispatchKeyEvent(event);
+ }
+
+ @Override
+ public void onWindowFocusChanged(boolean hasFocus)
+ {
+ super.onWindowFocusChanged(hasFocus);
+ JFSDK.getInstance().onWindowFocusChanged(hasFocus);
+ }
+
+ @Override
+ public void onBackPressed()
+ {
+ super.onBackPressed();
+ JFSDK.getInstance().onBackPressed(GTGameMain.I.activity);
+ }
}
\ No newline at end of file
--
Gitblit v1.8.0