What happens on a real device? The emulator behaviour is not always the same as real devices. What is happening if you look at the source code of the example is that it is trying to open the Location settings activity and apparently failing. What should happen is that on return from enabling GPS in the Location activity Activity_Resume will run again, detect that GPS is available and request permission to use it.