Skip to content

cweiske/headphoneindicator

Repository files navigation

Headphone indicator

Android app that shows a notification icon in the status bar when headphones are plugged into the phone.

The app aims to be a tiny as possible.

Runs on Android 4.4+.

Usage

After installation, you have to start the application at least once. Then it will be running as a background service that shows the headset status icon whenever the headphones are plugged in.

You can close the app, and the status icon will still work - even after rebooting your phone.

Why was it written?

I wrote the headphone indicator app because I was immensely unsatisfied with apps like susomena's Headphones Indicator which are over 2 MiB in size, but 99% of their code is only related to advertisement.

My task was to show that you can make it much, much better.

Installation

You have several installation options:

  1. Install from F-Droid
  2. Pay on Google Play
  3. Download .apk from Github
  4. Build it yourself

Building

$ gradle build

Note that AndroidStudio 1.5.1 does not detect the gradle configuration correctly and produces .apk files much larger than necessary, with duplicated files.

gradle on command line does it correctly, though.

Releasing

Build it normally, then sign the generated package file:

$ gradle assembleRelease

To sign the release with your key, put the path to the signing configuration file into gradle.properties:

signingconfigfile=/path/to/signing-config.gradle

The signing configuration file should look like shown in Handling signing configs with Gradle

Dependencies

  • gradle 2.12 (earlier will probably work, too)
  • Android SDK 19

About headphone indicator

Source code

Headphone indicators's source code is available from http://git.cweiske.de/headphoneindicator.git or the mirror on github.

License

Headphone indicator is licensed under the GPL v3 or later.

Author

Headphone indicator was written by Christian Weiske.