feat: 畅玩管理更多功能—客户端 https://jira.shanqu.cc/browse/GHZS-1679
This commit is contained in:
@ -4,6 +4,7 @@ import static com.gh.gamecenter.common.constant.Constants.LOGIN_TAG;
|
||||
import static com.gh.gamecenter.common.constant.Constants.LOGOUT_TAG;
|
||||
import static com.gh.gamecenter.common.constant.EntranceConsts.ENTRANCE_BROWSER;
|
||||
import static com.gh.gamecenter.common.constant.EntranceConsts.HOST_LAUNCH_SIMULATOR_GAME;
|
||||
import static com.gh.gamecenter.common.constant.EntranceConsts.HOST_LAUNCH_VM_GAME;
|
||||
import static com.gh.gamecenter.common.constant.EntranceConsts.HOST_QQ;
|
||||
import static com.gh.gamecenter.common.constant.EntranceConsts.HOST_QQ_GROUP;
|
||||
import static com.gh.gamecenter.common.constant.EntranceConsts.HOST_WEB;
|
||||
@ -25,6 +26,7 @@ import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.SystemClock;
|
||||
import android.preference.PreferenceManager;
|
||||
@ -116,6 +118,7 @@ import com.gh.gamecenter.packagehelper.PackageViewModel;
|
||||
import com.gh.gamecenter.retrofit.RetrofitManager;
|
||||
import com.gh.gamecenter.room.AppDatabase;
|
||||
import com.gh.gamecenter.room.dao.SimulatorGameDao;
|
||||
import com.gh.vspace.VHelper;
|
||||
import com.google.android.exoplayer2.upstream.cache.Cache;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
@ -759,6 +762,24 @@ public class MainActivity extends BaseActivity {
|
||||
);
|
||||
}
|
||||
break;
|
||||
case HOST_LAUNCH_VM_GAME:
|
||||
String gamePackageName = getIntent().getStringExtra(EntranceConsts.KEY_GAME_PKG);
|
||||
if (TextUtils.isEmpty(gamePackageName)) {
|
||||
ToastUtils.showToast("游戏启动失败,请联系客服反馈相关信息");
|
||||
return;
|
||||
}
|
||||
ToastUtils.showToast("游戏启动中,请稍后~");
|
||||
handler.postDelayed(() -> {
|
||||
VHelper.postOnInitialized(() -> {
|
||||
if (VHelper.isInstalled(gamePackageName)) {
|
||||
VHelper.launch(this, gamePackageName);
|
||||
} else {
|
||||
ToastUtils.showToast("应用已被卸载!");
|
||||
}
|
||||
return null;
|
||||
});
|
||||
}, 500);
|
||||
break;
|
||||
case KEY_MARKET_DETAILS:
|
||||
redirectGameDetail(bundle.getString(KEY_DATA));
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user