Home Turn on/off gps using button without getting into setting menu
Reply: 1

Turn on/off gps using button without getting into setting menu

Muhammad Badrudin
1#
Muhammad Badrudin Published in 2017-09-14 02:43:06Z

I want to ask about turn on gps in android without getting into setting menu. 1. Does that method possibly to do? 2. If yes how to do that? Thank you.

Vlad Matvienko
2#
Vlad Matvienko Reply to 2017-09-14 06:14:57Z

it is impossible. Only user can turn on/off GPS.
That is done because you shouldn't be able to get user's location if he doesn't want you to get it.
Only thing that you can do is to ask him to turn it on/off by opening GPS settings:

startActivity(new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS));
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.38171 second(s) , Gzip On .

© 2016 Powered by cudou.com design MATCHINFO