Commit 8f484a26 authored by 柯南's avatar 柯南 Committed by Gitee

游戏退出返回游戏主页

parent 35c00d04
......@@ -549,6 +549,14 @@ public class YGOMobileActivity extends NativeActivity implements
@Override
public void onGameExit() {
Log.e("ygomobile", "game exit");
Intent intent = new Intent("ygomobile.intent.action.GAME");
intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
intent.setPackage(getPackageName());
try {
startActivity(intent);
} catch (Throwable ignore) {}
Process.killProcess(Process.myPid());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment