I want to find out the GPS status, when I launch the application. For that I previously used LocationListener class,
It was showing the status of the GPS when changing the GPS status in device only.
But here is my requirement: when I launch the app first it should check the GPS status, if GPS is available, only then I want to start the my activity and otherwise it needs to display some message to user like “Please enable GPS.”
How can I do this?
I thinks this method can help you: