Android Reactive LocationManager callbacks.
This library also includes some helper observables to get altitude using GPS, barometric sensor or a remote service (build in Google elevation API implementation included). GPS altitude may returned both ellipsoidal and geoidal (mean sea level), android Location.getAltitude() returns ellipsoidal altitude but in most case you want to get geoidal one.
An extra standalone library is available to parse NMEA messages (v2.3+ specification) that may be returned from observeNmea(). Actual available parsers are:
- GGA
- GLL
- GSA
- RMC (timing and navigational)
- more to come... and PR welcome!
You can easily add you own parser, just inherit from net.samystudio.rxlocationmanager.nmea.Nmea class and use net.samystudio.rxlocationmanager.nmea.TokenValidator to validate your messages.
implementation 'net.samystudio.rxlocationmanager:rxlocationmanager:0.7.2'If you need altitude helpers observables add this as well:
implementation 'net.samystudio.rxlocationmanager:rxlocationmanager-altitude:0.7.2'If you want to easily parse nmea messages you can use this standalone artifact (note this is already include if you added rxlocationmanager-altitude dependency):
implementation 'net.samystudio.rxlocationmanager:rxlocationmanager-nmea:0.7.2'Snapshots are available from Sonatype's snapshots repository.
If you want to run latest snapshot add its repository from your root build.gradle:
allprojects {
repositories {
google()
// ...
maven { url "https://central.sonatype.com/repository/maven-snapshots/" }
}
}and change versions:
implementation 'net.samystudio.rxlocationmanager:rxlocationmanager:0.7.3-SNAPSHOT'
implementation 'net.samystudio.rxlocationmanager:rxlocationmanager-altitude:0.7.3-SNAPSHOT'
implementation 'net.samystudio.rxlocationmanager:rxlocationmanager-nmea:0.7.3-SNAPSHOT'Check xxx-sample directories.
- Change the version in
gradle.propertiesto a non-SNAPSHOT version. - Update the
CHANGELOG.mdfor the impending release. - Update the
README.mdwith the new version. git commit -am "Prepare for release X.Y.Z"(where X.Y.Z is the new version)./gradlew publish --no-daemon --no-parallelgit tag -a X.Y.Z -m "Version X.Y.Z"(where X.Y.Z is the new version)- Update the
gradle.propertiesto the next SNAPSHOT version. git commit -am "Prepare next development version"git push && git push --tags./gradlew closeAndReleaseRepositoryor visit Sonatype Nexus and promote the artifact.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.