Prompting for location permission when NOT monitoring in background?
问题 I'm using the Android Beacon Library. Since Marshmallow, I am seeing the following error, as expected and documented. Permission denial: Need ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission to get scan results I have my ranging code in a Fragment, and the RuntimeException is thrown when the Fragment is on screen, as expected as I'm not prompting for permission. If I hit the home button, Pause is called, and I'm unbinding beaconManager, and the exception is no longer thrown, again,