Android app that shows a notification icon in the status bar when headphones are plugged into the phone.
Shows a different icon when a headset is attached. Both 3.5mm audio jack devices and USB headphones/headsets are supported.
The app aims to be a tiny as possible.
Runs on Android 4.4+.
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.
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.
You have several installation options:
- Install from F-Droid
- Pay on Google Play
- Download
.apk
from Github - Build it yourself
$ ./gradlew build
Modify the version in AndroidManifest.xml`
.
Disable resource file optimization in gradle.properties
:
android.enableResourceOptimizations=false
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
- gradle 8.5.2 (earlier will probably work, too)
- Android SDK 34 (compiles for SDK 19 - Android 4.4)
The code repository contains the meta data needed for the Google Play store: Text, icons, screenshots.
They follow the Triple-T gradle publisher, which are also ingested by F-Droid.
The meta data directory is src/main/play/
- with main
even though
this app has no flavors, but it's required by f-droid.
Headphone indicators's source code is available from http://git.cweiske.de/headphoneindicator.git or the mirror on github.
Headphone indicator is licensed under the GPL v3 or later.
Headphone indicator was written by Christian Weiske.