I am developing an application wherein I want to enable GPS, when I start my activity and I want to disable GPS when I exit my application. Can I do it through my program..
Any help would be appreciated.
I am developing an application wherein I want to enable GPS, when I start my activity and I want to disable GPS when I exit my application. Can I do it through my program..
Any help would be appreciated.
You can start the GPS by using
To stop the gps provider use
I know it is too late but directly starting location service will not work. Instead use below code to start location service.