• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How to simulate gyroscope on devices that don't have a gyroscope?

Calendon

Lurker
Sep 9, 2020
2
0
I asked this question everywhere else but did not get any answer. How to simulate the gyroscope, accelerometer and other sensors on an Android Smart TV, set-top box and other devices that do not have any sensors?
The reason I ask is because I played some Android game on a set-top box that only accepted sensor input. So could there be an app that could simulate sensor input? Perhaps I could write a program that sets sensor data instead of getting sensor data. For example, is it possible to set a value to SensorEvent.values[0] ?
 
Do you enjoy coding more than playing games? I assume this thing responds to how much/how quickly you tilt the phone rather than just "left or right", so even if you can code something that runs in the background and translates your keyboard input or whatever into accelerometer events I expect it will take a lot of work tuning it and still produce a jerky or over-responsive/under-responsive/both-at-different-times result. Hacking the game will bring the further complication that you don't have the source code.

Unless you are time-rich but cash-poor and enjoy doing this type of thing a simpler solution is probably to just play it on a phone. Maybe you can cast it from a phone to the TV box (I've never bothered with casting from a phone to TV so don't know)?
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones