The post has been translated automatically. Original language: Russian
The phone can do much more than show the screen and make calls. It has a dozen sensors, and some of them are used by applications all the time.
The acceleration sensor understands how the phone is moving. It is he who tells you that a person is walking, and he counts the steps.
The rotation sensor tells you how the phone is rotated in space. Thanks to it , the screen turns over, and tilt control works in games.
The magnetic sensor shows the direction to the north. Without it, the map wouldn't know where you're looking.
The light sensor changes the brightness of the screen depending on the lighting. The proximity sensor turns off the screen when the phone is at your ear.
Location detection works from several sources at once: satellites, nearby communication towers, and known access points. There are more accurate satellites on the street , and other sources indoors.
This leads to useful conclusions for development. Sensor data is received frequently, and there is usually no need to process each value: it is enough to average over a short period.
The second conclusion is about accuracy. You should request the highest accuracy of the location only where it is really needed.
And the third one. Each sensor that the application accesses must be understood by the user. A clear explanation of why this data is needed removes most of the questions.
Does your app use sensor data or just the network and the screen?
Телефон умеет гораздо больше, чем показывать экран и звонить. В нём десяток датчиков, и часть из них приложения используют постоянно.
Датчик ускорения понимает, как телефон двигается. Именно он подсказывает, что человек идёт, и он же считает шаги.
Датчик поворота сообщает, как телефон повёрнут в пространстве. Благодаря ему экран переворачивается, а в играх работает управление наклоном.
Магнитный датчик показывает направление на север. Без него карта не знала бы, куда вы смотрите.
Датчик света меняет яркость экрана в зависимости от освещения. Датчик приближения гасит экран, когда телефон у уха.
Определение расположения работает от нескольких источников сразу: спутники, ближайшие вышки связи и известные точки доступа. На улице точнее спутники, в помещении остальные источники.
Из этого следуют полезные для разработки выводы. Данные датчиков приходят часто, и обрабатывать каждое значение обычно незачем: достаточно усреднять за короткий период.
Второй вывод про точность. Запрашивать наивысшую точность расположения стоит только там, где она действительно нужна.
И третий. Каждый датчик, к которому обращается приложение, пользователь должен понимать. Понятное объяснение, зачем нужны эти данные, снимает большинство вопросов.
А в вашем приложении используются данные датчиков или только сеть и экран?