Answer the question
In order to leave comments, you need to log in
How to work with geolocation in Android?
Hello
, I apologize in advance, maybe the question is stupid, I'm just 0 in Android.
To be honest, I don't know exactly how to formulate the question, but the essence is this. I was given a task at the university - software disabling geolocation on Android.
Having surfed the Internet, I seemed to have found the answers, but to be honest, I got confused and therefore I ask for help. The questions are:
1) Do I understand correctly that it is impossible to disable gps programmatically (if possible then how)?
2) I looked at api and did not fully understand by turning off wi-fi, it means that I will completely turn it off, or I will turn it off only for my application, i.e. my application will not use wi-fi, while others will be able to
3) in general, can you completely disable geolocation on your phone, or not programmatically?
4) and the last if, for example, there is no gps shutdown in api, then I need to write (firmware, drivers) and solve them already. Well, or just in the source code, I can replace something.
And if there is any literature, articles, please send them off, they would be very useful to me.
Sincerely, Vladimir Stromov
Answer the question
In order to leave comments, you need to log in
In current versions, software disabling of GPS, and in general, geolocation functions, is impossible. WiFi is disabled for the entire system, but this will be removed soon.
These features will remain only for those who develop their own firmware and can sign the application with a system key.
На некоторых старых устройствах, будет работать конструкция вида:
Intent intent = new Intent("android.location.GPS_ENABLED_CHANGE");
intent.putExtra("enabled", true);
sendBroadcast(intent);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question