- Kotlin 99.3%
- Shell 0.7%
nup-android
Android client for streaming music from nup.
Overview
Phone
light mode screenshot dark mode screenshot browse screenshot search screenshot
Android Auto
Android Auto presets screenshot Android Auto browse screenshot Android Auto playback screenshot
Building and installing
Build APK:
gradle assembleDebug
Build and install APK:
gradle installDebug
The [dev.sh][./dev.sh] script can be used to build an unoptimized APK quickly (well, less slowly).
Debugging
Watch logs:
adb logcat --pid=$(adb shell pidof -s org.erat.nup) '*:D'
Logs are also written to text files in
/storage/emulated/0/Android/data/org.erat.nup/files/logs.
View crashes:
adb shell dumpsys dropbox nup_crash --print
Crashes are also written to text files in
/storage/emulated/0/Android/data/org.erat.nup/files/crashes.
View StrictMode violations (may include other apps):
adb shell dumpsys dropbox data_app_strictmode --print
Copy database off device:
adb shell "run-as org.erat.nup cat databases/NupSongs" >NupSongs
(Sigh: sqlite3 isn't installed on production devices, the normal adb shell
user doesn't have permission to read the org.erat.nup data, and the
org.erat.nup user doesn't have permission to write to /sdcard.)
Android Auto
Android Auto support can be tested using the Desktop Head Unit. Once the DHU
is installed, select Start head unit server in the Android Auto app and run
the following from the extras/google/auto directory in the SDK:
adb forward tcp:5277 tcp:5277
./desktop-head-unit
To convert an MP3 file so it can be passed to DHU as microphone input:
ffmpeg -i speech.mp3 -acodec pcm_s16le -ar 16000 -ac 1 speech.wav
It can then be specified via the DHU prompt:
> mic play /path/to/speech.wav
Testing
Run unit tests:
gradle testDebug
Run a single unit test (wildcards also supported):
gradle testDebug --tests 'SongDatabaseTest.rateAndTag'
Run lint checks:
gradle lintDebug