I have published a small library that can make it easy to get location data in Android, it even takes care of Android M runtime permissions.
You might check it out here: https://github.com/julioromano/RxLocation and use it or its source code as examples for your implementation.