This article explains how to disable sensors on Android with a single button tap. It also explains what happens when you do so.
How to turn off all sensors on Android phone? Turn off all sensors and save battery life!
The quickest way to disable all sensors at once is to turn Sensors Off. This switch can be enabled in the developer options.
Enable developer options. On some phones, you can do this in Settings > About phone; tap Build number until you see a message saying you're a developer.
Go to Settings > System > Developer options > Developer quick settings tiles.