diff --git a/CHANGELOG.md b/CHANGELOG.md
index b4d040f76..fe91c5b54 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased]
+- We hardened the Android main screen against overlay and tapjacking attacks, and removed the unused `SYSTEM_ALERT_WINDOW` permission.
+
## [20.0.0] - 2026-08-03
- We fixed an issue that could cause iOS apps to restart repeatedly after an OTA update.
diff --git a/android/app/src/appstore/java/com/mendix/nativetemplate/MainActivity.java b/android/app/src/appstore/java/com/mendix/nativetemplate/MainActivity.java
index 2532632cb..9d5c50d81 100644
--- a/android/app/src/appstore/java/com/mendix/nativetemplate/MainActivity.java
+++ b/android/app/src/appstore/java/com/mendix/nativetemplate/MainActivity.java
@@ -21,6 +21,10 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
boolean hasDeveloperSupport = ((MainApplication) getApplication()).getUseDeveloperSupport();
mendixApp = new MendixApp(AppUrl.getUrlFromResource(this), MxConfiguration.WarningsFilter.none, hasDeveloperSupport, false);
super.onCreate(savedInstanceState);
+ getWindow().getDecorView().setFilterTouchesWhenObscured(true);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
+ getWindow().setHideOverlayWindows(true);
+ }
// Checks the current theme and apply the correct style (Backwards compatible)
boolean isDarkMode;
diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml
index 2e1d956a7..fa3b6d6e5 100644
--- a/android/app/src/debug/AndroidManifest.xml
+++ b/android/app/src/debug/AndroidManifest.xml
@@ -4,7 +4,6 @@
package="com.mendix.nativetemplate">
-
diff --git a/android/app/src/dev/AndroidManifest.xml b/android/app/src/dev/AndroidManifest.xml
index 26739c5df..7cb684c8d 100644
--- a/android/app/src/dev/AndroidManifest.xml
+++ b/android/app/src/dev/AndroidManifest.xml
@@ -17,6 +17,7 @@
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode|fontScale"
android:launchMode="singleInstance"
android:windowSoftInputMode="adjustPan"
- android:exported="true">
+ android:taskAffinity=""
+ android:exported="false">
diff --git a/android/app/src/dev/java/com/mendix/nativetemplate/MainActivity.java b/android/app/src/dev/java/com/mendix/nativetemplate/MainActivity.java
index 63977ae71..b7158db47 100644
--- a/android/app/src/dev/java/com/mendix/nativetemplate/MainActivity.java
+++ b/android/app/src/dev/java/com/mendix/nativetemplate/MainActivity.java
@@ -57,6 +57,10 @@ public class MainActivity extends AppCompatActivity implements ZXingScannerView.
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_dev);
+ getWindow().getDecorView().setFilterTouchesWhenObscured(true);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
+ getWindow().setHideOverlayWindows(true);
+ }
appPreferences = new AppPreferences(this);
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 37bef24ec..77014ef9e 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -7,7 +7,8 @@
tools:ignore="QueryAllPackagesPermission"/>
-
+
+
@@ -68,6 +69,7 @@
android:screenOrientation="portrait"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode|fontScale"
android:windowSoftInputMode="adjustPan"
+ android:taskAffinity=""
android:exported="true">