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.
This commit is contained in:
2026-05-10 02:45:26 +07:00
parent 4fde3f1ebf
commit 1ec48634e4
3 changed files with 29 additions and 3 deletions
+21
View File
@@ -102,6 +102,27 @@ If you ever add a remote feature (analytics, sync, etc.), add this back to
<uses-permission android:name="android.permission.INTERNET" />
```
## 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 |
+8
View File
@@ -37,4 +37,12 @@
<!-- No INTERNET permission: app is fully offline. All assets bundled in
APK; WebView serves from https://localhost which uses loopback. -->
<!-- Mark hardware as optional so emulators (BlueStacks, NoxPlayer, AVDs)
don't get filtered out. BlueStacks reports `faketouch` instead of
`touchscreen` and lacks real telephony/GPS hardware. -->
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.hardware.faketouch" android:required="false" />
<uses-feature android:name="android.hardware.screen.portrait" android:required="false" />
<uses-feature android:name="android.hardware.screen.landscape" android:required="false" />
</manifest>
-3
View File
@@ -4,8 +4,5 @@
"webDir": "loto/build",
"server": {
"androidScheme": "https"
},
"android": {
"webContentsDebuggingEnabled": false
}
}