tranquvis / SimpleSmsRemote

Android app for remotely controlling a phone through sms messages
MIT License
129 stars 37 forks source link

ACCESS_COARSE_LOCATION permission #37

Open ghost opened 5 years ago

ghost commented 5 years ago

Hi. Could you add the permission "ACCESS_COARSE_LOCATION" (not only the GPS, even the network)?

tranquvis commented 5 years ago

As i know, with ACCESS_FINE_LOCATION you are able to access GPS as well as the network. In other words, ACCESS_FINE_LOCATION automatically implies ACCESS_COARSE_LOCATION.

From the android documentation:

You only need to request one of the Android location permissions, depending on the level of accuracy you need: ...

ghost commented 5 years ago

I don't know, but I tried to get my position using Simple sms remote and Sophos Mobile Security in two ways:

1) away from home 2) inside the house

In the first case, both apps returned my position, while in the second case, only Sophos did.

I checked, and Sophos has both permissions and hence the request for your app ..

tranquvis commented 5 years ago

I just did some more research, which confirmed my initial description. ACCESS_COARSE_LOCATION should not have an effect. Maybe other apps request ACCESS_COARSE_LOCATION if you don't grant ACCESS_FINE_LOCATION.

But it could be that my location request algorithm is improvable. Maybe we should change the Criteria in LocationUtils.RequestNewLocation. This needs some tests.