Skip to content

Android NoiseAlert: monitor noise level and wakeup device when noise exceeds certain threshold

License

Notifications You must be signed in to change notification settings

gernot-h/NoiseAlert

Repository files navigation

NoiseMonitor

A "noise trigger" application. Uses a media-recorder to listen on microphone
and periodically query the volume level. If a configured threshold is exceeded,
an event will be triggered to wake up the device and/or send an Android
broadcast. Will keep your CPU awake, so only use it when connected to mains!

This can be used to automate your Android device depending on surrounding noise
level.

Definitely no eye candy here, built using a lot of ugly code with duplicated
functionality and deprecated API calls -- forgive me, Java and app programming
is not my world. BUT it seems to work reliably on a Motorola Xoom running 
CyanogenMod 11 (i.e. Android 4.4.4), so I published it as it might
be useful for others. And refactoring pull requests are highly welcome. :)

The application has a main activity with a custom view object representing
a graphical sound volume display and a canned preferences activity. All user
interactions are triggered through the menu:

Start/Stop: start or stop monitoring
Test: activate monitoring without triggering any action to find right
  noise threshold.
Settings: Bring up preferences screen 

Author: Gernot Hillier <[email protected]>
License: http://www.apache.org/licenses/LICENSE-2.0

March 2016: First release, tested on some Android 5.x devices

This code is heavily based on an old Android example called "NoiseAlert":

Author: Bernhard Suter (Bernhard.R.Suter-at-gmail-dot-com)
Source: http://code.google.com/p/android-labs/source/browse/#svn/trunk/NoiseAlert

September 2008: Initial release for the Android platform running on T-Mobile G1.

About

Android NoiseAlert: monitor noise level and wakeup device when noise exceeds certain threshold

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages