|
...
|
...
|
@@ -13,7 +13,6 @@ import android.view.KeyEvent; |
|
|
|
import android.view.View;
|
|
|
|
import android.view.Window;
|
|
|
|
import android.view.WindowManager;
|
|
|
|
import android.webkit.JavascriptInterface;
|
|
|
|
import android.webkit.WebSettings;
|
|
|
|
import android.webkit.WebView;
|
|
|
|
|
|
...
|
...
|
@@ -66,8 +65,7 @@ public class AggH5MainActivity extends Activity { |
|
|
|
h5game = gameUrl;
|
|
|
|
}
|
|
|
|
h5game = String.format(h5game, STSSConstants.sdkParams.getGame_id(), STSSConstants.sdkParams.getCurrChannel());
|
|
|
|
String newH5Url = h5game + "?" + ParamsTools.getParams(mContext, currToken);
|
|
|
|
webView.loadUrl(newH5Url);
|
|
|
|
loadH5Game();
|
|
|
|
}
|
|
|
|
|
|
|
|
private void initView() {
|
|
...
|
...
|
@@ -150,9 +148,7 @@ public class AggH5MainActivity extends Activity { |
|
|
|
runOnUiThread(new Runnable() {
|
|
|
|
@Override
|
|
|
|
public void run() {
|
|
|
|
String newH5Url = h5game + "?" + ParamsTools.getParams(mContext, currToken);
|
|
|
|
AggH5Log.d(TAG, newH5Url);
|
|
|
|
webView.loadUrl(newH5Url);
|
|
|
|
loadH5Game();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
} else {
|
|
...
|
...
|
@@ -176,10 +172,9 @@ public class AggH5MainActivity extends Activity { |
|
|
|
AggH5MainActivity.this.runOnUiThread(new Runnable() {
|
|
|
|
@Override
|
|
|
|
public void run() {
|
|
|
|
//showToast("个人中心退出帐号成功");
|
|
|
|
currToken = null;
|
|
|
|
loadH5Game();
|
|
|
|
login();
|
|
|
|
AggH5Log.d(TAG, "实现游戏的切换或注销帐号的流程,比如回到登陆界面");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
...
|
...
|
@@ -210,14 +205,10 @@ public class AggH5MainActivity extends Activity { |
|
|
|
}, 1000);
|
|
|
|
}
|
|
|
|
|
|
|
|
@JavascriptInterface
|
|
|
|
public void logout() {
|
|
|
|
STSSAggGame.logout();
|
|
|
|
}
|
|
|
|
|
|
|
|
@JavascriptInterface
|
|
|
|
public void exit() {
|
|
|
|
STSSAggGame.exit();
|
|
|
|
private void loadH5Game() {
|
|
|
|
String newH5Url = h5game + "?" + ParamsTools.getParams(mContext, currToken);
|
|
|
|
AggH5Log.d(TAG, newH5Url);
|
|
|
|
webView.loadUrl(newH5Url);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
...
|
...
|
|