add build signing information
[headphoneindicator.git] / README.rst
1 *******************
2 Headphone indicator
3 *******************
4 Android app that shows a notification icon in the status bar when
5 headphones are plugged into the phone.
6
7 The app aims to be a tiny as possible.
8
9 Runs on Android 4.4+.
10
11
12 =====
13 Usage
14 =====
15 After installation, you have to start the application `at least once`__.
16 Then it will be running as a background service that shows the headset
17 status icon whenever the headphones are plugged in.
18
19 You can close the app, and the status icon will still work - even after
20 rebooting your phone.
21
22 __ http://stackoverflow.com/a/8535062/282601
23
24
25 ===================
26 Why was it written?
27 ===================
28 I wrote the headphone indicator app because I was immensely unsatisfied
29 with apps like `susomena's Headphones Indicator`__ which are over
30 2 MiB in size, but 99% of their code is only related to advertisement.
31
32 My task was to show that you can make it much, much better.
33
34 __ https://play.google.com/store/apps/details?id=com.susomena.headphonesindicator
35
36
37 ========
38 Building
39 ========
40 ::
41
42     $ ./gradlew build
43
44 Note that AndroidStudio 1.5.1 does not detect the gradle configuration correctly
45 and produces ``.apk`` files much larger than necessary, with duplicated files.
46
47 ``gradlew`` on command line does it correctly, though.
48
49
50 Releasing
51 =========
52 Build it normally, then sign the generated package file::
53
54     $ ./gradlew assembleRelease
55
56 To sign the release with your key, put the path to the signing configuration
57 file into ``gradle.properties``::
58
59     signingconfigfile=/path/to/signing-config.gradle
60
61 The signing configuration file should look like shown in
62 `Handling signing configs with Gradle`__
63
64 __ https://www.timroes.de/2013/09/22/handling-signing-configs-with-gradle/
65
66
67 =========================
68 About headphone indicator
69 =========================
70
71 Source code
72 ===========
73 Headphone indicators's source code is available from
74 http://git.cweiske.de/headphoneindicator.git
75 or the `mirror on github`__.
76
77 __ https://github.com/cweiske/headphoneindicator
78
79
80 License
81 =======
82 Headphone indicator is licensed under the `GPL v3 or later`__.
83
84 __ http://www.gnu.org/licenses/gpl.html
85
86
87 Author
88 ======
89 Headphone indicator was written by `Christian Weiske`__.
90
91 __ http://cweiske.de/
92