Skip to content

Latest commit

 

History

History
25 lines (22 loc) · 969 Bytes

README.md

File metadata and controls

25 lines (22 loc) · 969 Bytes

Core Rx Location

RxLocationProvider

Simple facade above ReactiveLocationProvider to receive location - both LastKnown and Updated. Also it checks and handle location settings state, and process result without overriding and handling onAcitivtyResult

Sample usage:

val rxLocationManager = RxLocationManager(this, 1100, 10)
rxLocationManager.requestLocation()
                    .subscribe {
                        locationLog.text = if (!it.isEmpty()) {
                            getString(R.string.mask_location_result, ++updatesCount, it.toString())
                        } else {
                            getString(R.string.error_empty_location)
                        }
                    }

For full list of functions, please look to the source code,example project or view documentation