https://github.com/bew/android-hello-world
Full hello world!
https://github.com/bew/android-hello-world
Last synced: 15 days ago
JSON representation
Full hello world!
- Host: GitHub
- URL: https://github.com/bew/android-hello-world
- Owner: bew
- Created: 2026-05-02T02:53:19.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-16T20:15:17.000Z (about 1 month ago)
- Last Synced: 2026-05-16T22:25:58.475Z (about 1 month ago)
- Language: Nix
- Size: 21.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hello World app
A simple Android app built with Jetpack Compose.
Features:
- Full Nix-based dev environment
- `just`-based project helpers to build/install/run/watch the app/watch logs
- Auto dark/light colorscheme based on the system
- Logging setup using `Timber`, initialized early
- Setup with `MainActivity`, `MainScreen`, and a few components
- A `SimpleCounter` component with _internal_ state
- Comments everywhere explaining things
## Requirements
- Nix (with flakes enabled)
- An Android phone for testing (See [./DEVICE_SETUP.md](./DEVICE_SETUP.md))
## Setup
```sh
nix develop
```
## Build & Run
```sh
just build # build (debug APK)
just install # (build+)install on connected device
just run # Start the app on the connected device
```
## Virtual display on the computer using [`scrcpy`][scrcpy]
[scrcpy]: https://github.com/Genymobile/scrcpy
Using [`scrcpy`][scrcpy] we can create a virtual display on the phone (separate from its physical
screen), which opens as a dedicated window on your computer.
```sh
# Start the virtual display
just start-ui
# Note the DISPLAY_ID at the end of the log line about the new display:
# `[server] INFO: New display: 1116x2484/372 (id=33)` 👉 DISPLAY_ID=33
# Now you can run the app on the virtual display
just run DISPLAY_ID
# Or (build+)install+run
just install-run DISPLAY_ID
```
Example for `id=5`: `just run 5`
> [!NOTE]
> If the virtual display goes black, close the window & `just start-ui` again.
> (see notes in `justfile`)