Reputation: 27521
I want to create a app which send users current location when user click on send button . If gps is on than it will send the location, if gps is off then it automatically start the gps and then send location... Manifest permissions is not a problem, problem is that it should not pop up dialogue to start gps when it is off.. Please help me, i really need help..
I want to know that is it possible? If yes then a provide useful link or code or any kind of hint.. Thank you :)
Upvotes: 0
Views: 3883
Reputation: 3533
There are a lot of other threads discussing this, and the general consensus is that it shouldn't be possible, even though on some versions there are exploits that allow it.
However, this doesn't seem to be ethical, since you are violating your users privacy by not allowing them to choose whether or not they want to share their location.
How can I enable or disable the GPS programmatically on Android?
Turning on and off GPS programmatically in android 4.0 and above?
ICS Android enable gps programmatically?
Upvotes: 1