Created
August 13, 2017 18:27
-
-
Save pranayairan/28ff41e02ecc8796bb7a53e4ee5c47e2 to your computer and use it in GitHub Desktop.
Simple code for RXPermission to get location
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rxPermissions.request(Manifest.permission.ACCESS_FINE_LOCATION) | |
| .subscribe(new Consumer<Boolean>() { | |
| @Override | |
| public void accept(@NonNull Boolean locationPermissionGranted) throws Exception { | |
| // if location permission is granted query the api | |
| if (locationPermissionGranted) { | |
| } else { | |
| } | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment