From f29aad0cf5a667b018dac24d5faf678ede375d63 Mon Sep 17 00:00:00 2001 From: Nikhil Kumar Singh Date: Tue, 6 Oct 2026 02:57:18 +0530 Subject: [PATCH] docs: add readme --- README.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..d1ebd08 --- /dev/null +++ b/README.md @@ -0,0 +1,51 @@ +# SMS Server + +Android app that runs a small HTTP server on the phone. A computer can send API +requests to send SMS through the device SIM. + +## Endpoints + +| Method | Path | Description | +| ------ | -------- | ------------------------------------ | +| GET | /status | running state, IP, port, counters | +| POST | /send | `{"to": "+15551234567", "message": "hi"}` | +| GET | /log | recent sends | +| GET | / | endpoint list | + +Optional API token: set it in the app; requests then need +`Authorization: Bearer ` or `X-API-Key: `. + +## Build + +```bash +./gradlew assembleDebug +``` + +APK: `app/build/outputs/apk/debug/app-debug.apk` + +## Install + +```bash +adb install -r app/build/outputs/apk/debug/app-debug.apk +``` + +## Run + +Open the app, allow the SMS permission, press **Start server**, then from a +computer on the same WiFi: + +```bash +curl http://:8080/status +curl -X POST http://:8080/send \ + -H 'Content-Type: application/json' \ + -d '{"to": "+15551234567", "message": "hello from pc"}' +``` + +Device IP and port are shown on screen. Default port 8080, changeable in the +app. The server runs as a foreground service and keeps running in the +background. + +## Notes + +- Needs a phone with a SIM; messages go through the carrier. +- Plain HTTP on the LAN. Do not expose it to the internet. \ No newline at end of file -- knotmirror 0.0.1