• 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
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] ?
 
I'm pretty sure no such app exists. Maybe you could write one, I don't know, I'm not a dev.

However games that require gyro and accelerometer movement input to play, e.g. Pokemon Go, probably wouldn't even be playable on a static device like a TV box would they?
 
So this game is dependent on position-based sensor input, presumably intended to be installed only on appropriate mobile devices and not stationary, set top appliances. As such, all your queries might be going unanswered because it's just not feasible.
 
The game in particular was Gangstar Rio, and it only needed gyroscope input where the player flies a helicopter. The only alternative solution I could think of was to hack the game and change sensor input code to keyboard or something else.
 
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)?
 
Back
Top Bottom