1. Are you ready for the Galaxy S20? Here is everything we know so far!

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

Discussion in 'Android Development' started by Calendon, Sep 9, 2020.

  1. Calendon

    Calendon Lurker
    Thread Starter

    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] ?
     


  2. mikedt

    mikedt 你好

    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?
     
  3. svim

    svim Extreme Android User

    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.
     
  4. Calendon

    Calendon Lurker
    Thread Starter

    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.
     
  5. Hadron

    Hadron Smoke me a kipper...
    VIP Member

    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)?
     
Loading...
Similar Threads - simulate gyroscope devices
  1. App Update
    Replies:
    0
    Views:
    113
  2. iTP
    Replies:
    0
    Views:
    262
  3. Olivianeal
    Replies:
    2
    Views:
    375
  4. App Update
    Replies:
    0
    Views:
    134
  5. App Update
    Replies:
    0
    Views:
    116
  6. App Update
    Replies:
    0
    Views:
    122
  7. App Update
    Replies:
    0
    Views:
    236
  8. sniperdronegame
    Replies:
    0
    Views:
    360
  9. SampsonNation
    Replies:
    0
    Views:
    1,084
  10. aqsa0123
    Replies:
    2
    Views:
    1,183

Share This Page

Loading...