Skip to content

code-layne/ambient_lp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brown Noise — Light Phone 3

Single-screen Android app. Tap Play → brown noise runs forever, screen-off included. Tap Stop → silence.

Target

  • Light Phone 3 / LightOS (Android 8.1, API 27)
  • Sideloaded via developer mode. No Play Store.

Building

Requires Android SDK with build-tools 28.0.3 and platform android-27.

Android Studio (easiest)

  1. Open this folder as an existing project.
  2. Let Gradle sync.
  3. Build → Build Bundle(s) / APK(s) → Build APK(s).
  4. APK lands at app/build/outputs/apk/debug/app-debug.apk.

Command line

# one-time: generate the wrapper jar (run inside the project root)
gradle wrapper --gradle-version 5.6.4

# then build
./gradlew assembleDebug

Sideload

adb install -r app/build/outputs/apk/debug/app-debug.apk

Architecture

File Role
BrownNoiseGenerator.kt AudioTrack streaming generator. Leaky integrator over Gaussian white noise → brown noise.
NoiseService.kt Foreground Service. Creates notification channel, calls startForeground(), holds PARTIAL_WAKE_LOCK so CPU keeps feeding the buffer during screen-off.
MainActivity.kt Single Activity. Toggle button starts/stops the service. Activity finish does not stop playback.

Notes

  • No FOREGROUND_SERVICE permission needed — that requirement starts at API 28.
  • The leaky integrator (runningSum * 0.999) prevents DC drift while preserving the −6 dB/octave spectral slope of brown noise.
  • START_STICKY means Android will restart the service after a kill, resuming playback automatically.

About

light phone app to sideload and enable ambient sound playback

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages