diff --git a/HMCLPE/src/main/java/com/tungsten/hmclpe/launcher/MainActivity.java b/HMCLPE/src/main/java/com/tungsten/hmclpe/launcher/MainActivity.java
index fbe21a5a..a5e9de74 100644
--- a/HMCLPE/src/main/java/com/tungsten/hmclpe/launcher/MainActivity.java
+++ b/HMCLPE/src/main/java/com/tungsten/hmclpe/launcher/MainActivity.java
@@ -24,6 +24,7 @@
import com.afollestad.appthemeengine.ATE;
import com.afollestad.appthemeengine.Config;
import com.tungsten.hmclpe.R;
+import com.tungsten.hmclpe.launcher.dialogs.OutdatedWarningDialog;
import com.tungsten.hmclpe.launcher.dialogs.VerifyDialog;
import com.tungsten.hmclpe.launcher.dialogs.account.SkinPreviewDialog;
import com.tungsten.hmclpe.manifest.AppManifest;
@@ -133,6 +134,8 @@ public void handleMessage(@NonNull Message msg) {
exteriorConfig.apply(MainActivity.this);
appBar.setBackgroundColor(launcherSetting.transBar ? getResources().getColor(R.color.launcher_ui_background) : Color.parseColor(ExteriorSettingUI.getThemeColor(MainActivity.this,launcherSetting.launcherTheme)));
+ OutdatedWarningDialog.init(MainActivity.this);
+
isLoaded = true;
onLoad();
}
diff --git a/HMCLPE/src/main/java/com/tungsten/hmclpe/launcher/dialogs/OutdatedWarningDialog.java b/HMCLPE/src/main/java/com/tungsten/hmclpe/launcher/dialogs/OutdatedWarningDialog.java
new file mode 100644
index 00000000..a007d9e6
--- /dev/null
+++ b/HMCLPE/src/main/java/com/tungsten/hmclpe/launcher/dialogs/OutdatedWarningDialog.java
@@ -0,0 +1,69 @@
+package com.tungsten.hmclpe.launcher.dialogs;
+
+import android.annotation.SuppressLint;
+import android.app.Dialog;
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.net.Uri;
+import android.view.View;
+import android.widget.Button;
+import android.widget.CheckBox;
+
+import androidx.annotation.NonNull;
+
+import com.tungsten.hmclpe.R;
+
+public class OutdatedWarningDialog extends Dialog implements View.OnClickListener {
+
+ private CheckBox checkBox;
+ private Button pojav;
+ private Button fcl;
+ private Button positive;
+
+ public OutdatedWarningDialog(@NonNull Context context) {
+ super(context);
+ setCancelable(false);
+ setContentView(R.layout.dialog_outdated_warning);
+
+ checkBox = findViewById(R.id.hide);
+ pojav = findViewById(R.id.pojav);
+ fcl = findViewById(R.id.fcl);
+ positive = findViewById(R.id.positive);
+ pojav.setOnClickListener(this);
+ fcl.setOnClickListener(this);
+ positive.setOnClickListener(this);
+ }
+
+ public static void init(Context context) {
+ SharedPreferences sharedPreferences = context.getSharedPreferences("warning", Context.MODE_PRIVATE);
+ boolean shouldShow = sharedPreferences.getBoolean("outdated_warning", true);
+ if (shouldShow) {
+ OutdatedWarningDialog dialog = new OutdatedWarningDialog(context);
+ dialog.show();
+ }
+ }
+
+ @Override
+ public void onClick(View view) {
+ if (view == pojav) {
+ Uri uri = Uri.parse("https://github.com/PojavLauncherTeam/PojavLauncher");
+ Intent intent = new Intent(Intent.ACTION_VIEW, uri);
+ getContext().startActivity(intent);
+ }
+ if (view == fcl) {
+ Uri uri = Uri.parse("https://alist.8mi.tech/FCL");
+ Intent intent = new Intent(Intent.ACTION_VIEW, uri);
+ getContext().startActivity(intent);
+ }
+ if (view == positive) {
+ if (checkBox.isChecked()) {
+ SharedPreferences sharedPreferences = getContext().getSharedPreferences("warning", Context.MODE_PRIVATE);
+ @SuppressLint("CommitPrefEdits") SharedPreferences.Editor editor = sharedPreferences.edit();
+ editor.putBoolean("outdated_warning", false);
+ editor.apply();
+ }
+ dismiss();
+ }
+ }
+}
diff --git a/HMCLPE/src/main/res/layout/dialog_outdated_warning.xml b/HMCLPE/src/main/res/layout/dialog_outdated_warning.xml
new file mode 100644
index 00000000..1158e047
--- /dev/null
+++ b/HMCLPE/src/main/res/layout/dialog_outdated_warning.xml
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HMCLPE/src/main/res/values-zh/strings.xml b/HMCLPE/src/main/res/values-zh/strings.xml
index b4982e4e..b0c3c53f 100644
--- a/HMCLPE/src/main/res/values-zh/strings.xml
+++ b/HMCLPE/src/main/res/values-zh/strings.xml
@@ -1,5 +1,10 @@
+ 警告
+ HMCL-PE 已停止维护。 如果您想在 Android 设备上运行 Minecraft: Java 版并获得更好的体验,请下载 FoldCraftLauncher 或 PojavLauncher。
+ 不再显示
+ 我明白了
+
警告
启动器遇到无法处理的错误,请联系开发者解决。
确定
diff --git a/HMCLPE/src/main/res/values/strings.xml b/HMCLPE/src/main/res/values/strings.xml
index f40a660a..9f305f35 100644
--- a/HMCLPE/src/main/res/values/strings.xml
+++ b/HMCLPE/src/main/res/values/strings.xml
@@ -6,6 +6,11 @@
v2.0.7
Hello Minecraft! Launcher Pocket Edition v2.0.7
+ Warning
+ HMCL-PE has stopped maintenance. If you want to run Minecraft: Java Edition on Android devices and get a better experience, please download FoldCraftLauncher or PojavLauncher.
+ Don\'t show again
+ Got it
+
▲
UUID
/storage/emulated/0/HMCLPE/.minecraft