From 1ec48634e41fa0c00a3cb5d914f50b8d18610ba2 Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Sun, 10 May 2026 02:45:26 +0700 Subject: [PATCH] feat(android): make APK installable on BlueStacks and other emulators - Declare touchscreen/faketouch/screen.portrait/screen.landscape as uses-feature required=false so emulators (BlueStacks reports faketouch) and Play Store device filters do not exclude the app. - Drop explicit webContentsDebuggingEnabled override so Capacitor auto-enables WebView inspection in debug builds (chrome://inspect over ADB) and disables in release. - Document the install + troubleshoot path in README. --- README.md | 21 +++++++++++++++++++++ android/app/src/main/AndroidManifest.xml | 8 ++++++++ capacitor.config.json | 3 --- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index be6a35e..3a48b8f 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,27 @@ If you ever add a remote feature (analytics, sync, etc.), add this back to ``` +## Running on BlueStacks / NoxPlayer / Android emulators + +The APK has no native libraries (`lib/` is empty), so it's architecture- +independent — same APK installs on x86_64 emulators and ARM phones. + +1. Download the APK from the [Actions artifact](https://github.com/tiennm99/loto-android/actions) (debug) + or [Releases](https://github.com/tiennm99/loto-android/releases) (signed). +2. Drag-drop the APK onto the BlueStacks window, or use **Install APK** + from the sidebar. +3. Launch "Lo To" from the BlueStacks home screen. + +If the app shows a blank white screen on first launch, open chrome://inspect +on the host machine while BlueStacks is running, click **Inspect** on the +WebView, and check the console — the WebView debugging is enabled in debug +builds (Capacitor default behavior, no INTERNET permission needed because +chrome://inspect uses ADB). + +Manifest declares `touchscreen`, `faketouch`, `screen.portrait`, and +`screen.landscape` as **optional** so the Play Store and emulators don't +filter the app out. + ## CI / CD | Workflow | Trigger | Result | diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 20ef9ff..1f75722 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -37,4 +37,12 @@ + + + + + + diff --git a/capacitor.config.json b/capacitor.config.json index b21b26a..f6bc21d 100644 --- a/capacitor.config.json +++ b/capacitor.config.json @@ -4,8 +4,5 @@ "webDir": "loto/build", "server": { "androidScheme": "https" - }, - "android": { - "webContentsDebuggingEnabled": false } }