Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stephanj/androidrpiscoreboard
https://github.com/stephanj/androidrpiscoreboard
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/stephanj/androidrpiscoreboard
- Owner: stephanj
- Created: 2018-07-23T12:10:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-08T17:59:48.000Z (about 1 year ago)
- Last Synced: 2023-12-08T18:44:27.149Z (about 1 year ago)
- Language: Java
- Size: 321 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AndroidRPIScoreboard
KBBC Oostkamp scoreboard Android app running RPI 3 Model B using [emteria.OS](https://help.emteria.com/kb/devices-rpi-3).
## Connect via ADB to device using USB
~/java/tools/platform-tools $ ./adb connect 10.0.1.57:5555
## Run locally
Currently using Java 17 with Gradle 8.2
sdk use java 17.0.3-zulu
Build and run the app using Gradle
./gradlew
## Run Android on Simulated Device
Tools > Device Manager > + Create Virtual Device > Pixel 3a > Android 11
./gradlew installDebug## ADB
Download ADB from [here](https://dl.google.com/android/repository/platform-tools-latest-darwin.zip) and unzip to `~/java/tools/platform-tools`
./adb devices
./adb shell
./adb logcat## Curl Scoreboard access
### Login
curl -X POST -d "username=test&password=test" http://localhost:8080/api/auth/login
7a7a53ff-a904-4e92-af50-2dd7f17ebf60
### Create Game
curl -X POST "http://localhost:8080/api/game?teamA=2&teamB=1&type=0&age=0&court=B&mirrored=true"
{"game":{"id":14,"createdOn":"2023-12-06T16:31:47.232+00:00","userName":"na","teamA":{"id":12,"name":"2","key":"A","score":0,"fouls":0,"timeOut":0,"mirrored":true},"teamB":{"id":13,"name":"1","key":"B","score":0,"fouls":0,"timeOut":0,"mirrored":true},"gameType":"BASKET","ageCategory":"SENIOREN","quarter":1,"clock":600,"court":"B","mirrored":true}
### List Games
curl http://localhost:8080/api/game/list
[{"id":14,"createdOn":"2023-12-06T16:31:47.232+00:00","userName":"na","teamA":{"id":12,"name":"2","key":"A","score":0,"fouls":0,"timeOut":0,"mirrored":true},"teamB":{"id":13,"name":"1","key":"B","score":0,"fouls":0,"timeOut":0,"mirrored":true},"gameType":"BASKET","ageCategory":"SENIOREN","quarter":1,"clock":600,"court":"B","mirrored":true}]
### Get Game by Id
curl http://localhost:8080/api/game/14
{"id":14,"createdOn":"2023-12-06T16:31:47.232+00:00","userName":"na","teamA":{"id":12,"name":"2","key":"A","score":0,"fouls":0,"timeOut":0,"mirrored":true},"teamB":{"id":13,"name":"1","key":"B","score":0,"fouls":0,"timeOut":0,"mirrored":true},"gameType":"BASKET","ageCategory":"SENIOREN","quarter":1,"clock":600,"court":"B","mirrored":true}
### Get Game Clock
curl http://localhost:8080/api/clock/14
0
### Start Clock
curl -X PUT "http://localhost:8080/api/clock/start/14"