Skip to content

Commit

Permalink
prepare release
Browse files Browse the repository at this point in the history
- update documentation
- downgrade gradle to re-enable f-droid build
- debug build has different app ID, rather than non-tagged build
  • Loading branch information
ostrya authored and ostrya committed Jan 5, 2020
1 parent 57ed68b commit 93c535b
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 26 deletions.
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@
[<img src="https://f-droid.org/badge/get-it-on.png" alt="Get it on F-Droid" height="75">](https://f-droid.org/packages/org.ostrya.presencepublisher)
[<img src="https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png" height="75" alt="Get it on Google Play">](https://play.google.com/store/apps/details?id=org.ostrya.presencepublisher&pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1)

A simple app that regularly publishes to a configurable MQTT topic whenever connected to a given WiFi network.
This can be used to integrate the presence of your phone in home automation. Several networks can be configured
at once and the message to be sent can be configured for each network.
A simple app that regularly publishes to a configurable MQTT topic whenever connected to a given WiFi network or in
proximity to a Bluetooth beacon. This can be used to integrate the presence of your phone in home automation.

Several networks and beacons can be configured at once and the message to be sent can be configured for each of them.

Additionally, if your MQTT server is available on the internet, you can also choose to send messages whenever
you are not connected to any of the configured WiFi networks.
If your MQTT server is available on the internet, you can also choose to send an 'offline' message
whenever you are not connected to any of the configured WiFi networks and not in range of any configured beacon.

As an additional feature, you can send the battery level of your device whenever a condition is met, so that you can
recharge it before it turns off.

The app uses the built-in Android alarm manager, so notifications are sent even if the phone is in stand-by.

Expand Down Expand Up @@ -56,6 +60,8 @@ Make sure your PKCS#12 keystore file has the `.pfx` extension, otherwise Android
the permission in Android 6.0 - 8.1 for the app to work)
* ACCESS_NETWORK_STATE: necessary to register network change listener
* ACCESS_WIFI_STATE: necessary to retrieve SSID of connected WiFi
* BLUETOOTH: necessary to communicate with beacons
* BLUETOOTH_ADMIN: necessary to discover beacons
* INTERNET: only necessary if your MQTT server is not running locally
* RECEIVE_BOOT_COMPLETED: necessary to start service on start-up
* REQUEST_IGNORE_BATTERY_OPTIMIZATIONS: on Android 6+, necessary to request disabling battery optimization
Expand All @@ -65,7 +71,6 @@ Make sure your PKCS#12 keystore file has the `.pfx` extension, otherwise Android

* more conditions when to send notification
* time ranges
* presence of Bluetooth beacons
* actual location
* ...
* ...
14 changes: 5 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'com.github.triplet.play' version '2.6.2'
id 'com.github.triplet.play' version '2.5.0'
id 'com.jaredsburrows.license' version '0.8.42'
id 'org.ajoberstar.grgit' version '4.0.1'
}
Expand All @@ -11,10 +11,6 @@ def getBuildVersionCode() {
return isTagged() ? tagCount : tagCount + 1
}

def getBuildApplicationId() {
return isTagged() ? 'org.ostrya.presencepublisher' : 'org.ostrya.presencepublisher.snapshot'
}

def getBuildVersionName() {
return grgit.describe(tags: true, match: ['v[1-9]*']).substring(1)
}
Expand All @@ -39,7 +35,7 @@ def getSigningConfig() {
android {
compileSdkVersion 29
defaultConfig {
applicationId getBuildApplicationId()
applicationId 'org.ostrya.presencepublisher'
minSdkVersion 14
targetSdkVersion 29
versionCode 25
Expand All @@ -50,8 +46,9 @@ android {
}
buildTypes {
debug {
applicationIdSuffix ".debug"
debuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled true
Expand Down Expand Up @@ -97,8 +94,7 @@ play {
}

dependencies {
//noinspection GradleDependency due to https://github.com/AltBeacon/android-beacon-library/issues/919
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.appcompat:appcompat:1.2.0-alpha01'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.preference:preference:1.1.0'
implementation 'androidx.security:security-crypto:1.0.0-alpha02'
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/assets/open_source_licenses.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ <h3>Notice for packages:</h3>
<li>
<a href='#1288284111'>Android Support AnimatedVectorDrawable</a>
</li>
<li>
<a href='#1288284111'>Android Support CardView v7</a>
</li>
<li>
<a href='#1288284111'>Android Support Library Annotations</a>
</li>
Expand Down Expand Up @@ -136,6 +139,9 @@ <h3>Notice for packages:</h3>
<li>
<a href='#1288284111'>Android Support VectorDrawable</a>
</li>
<li>
<a href='#1288284111'>Android-beacon-library</a>
</li>
<li>
<a href='#1288284111'>AndroidX Preference</a>
</li>
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/play/listings/en-US/full-description.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
This app regularly publishes to a configurable MQTT topic whenever
connected to a given WiFi network. It can be used to integrate the presence
of your phone in home automation.
connected to a given WiFi network or in proximity to a Bluetooth beacon.
It can be used to integrate the presence of your phone in home automation.

The app uses the built-in Android alarm manager, so notifications are sent
even if the phone is in stand-by. In addition to regularly scheduled checks,
Expand All @@ -16,6 +16,8 @@ https://github.com/ostrya/PresencePublisher/blob/master/README.md .
• ACCESS_FINE_LOCATION: on Android 9+, necessary to retrieve SSID of connected WiFi (you do not need to grant the permission in Android 6.0 - 8.1 for the app to work)
• ACCESS_NETWORK_STATE: necessary to register network change listener
• ACCESS_WIFI_STATE: necessary to retrieve SSID of connected WiFi
• BLUETOOTH: necessary to communicate with beacons
• BLUETOOTH_ADMIN: necessary to discover beacons
• INTERNET: only necessary if your MQTT server is not running locally
• RECEIVE_BOOT_COMPLETED: necessary to start service on start-up
• REQUEST_IGNORE_BATTERY_OPTIMIZATIONS: on Android 6+, necessary to request disabling battery optimization
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 3 additions & 8 deletions app/src/main/play/release-notes/en-US/default.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
v1.7.1
• Fix crash due to missing classes.

v1.7.0
Updated the app to fully support Android 10.
• The Content tab has been renamed to Conditions and allows both adding networks and configuring their message.
• In addition to adding known networks, it is now possible to enter network names manually.
• The presence topic can now be found in the Schedule tab.
v2.0.0
• Added initial support for Bluetooth beacons.
• Fixed that battery messages where being sent via mobile regardless of settings.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

0 comments on commit 93c535b

Please sign in to comment.