top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Simulate accelerometer in real Android device without accelerometer hardware?

+5 votes

Can someone give a hint on how can I simulate accelerometer in Android? There should be acceleration and rotation events, would be good to know how to send actual events to it.

posted Feb 12, 2014 by Deepankar Dubey

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button
The SensorSimulator is not an option, i am not running the Emulator, I have a board with NO sensors, so I want to inject some sensor events.

Similar Questions
0 votes

I am interested in knowing how does Android handle path drawing using hardware acceleration considering the fact that OpenGL does not have path as a primitive.
I am stuck at native_drawPath which in turn calls a draw function whose implementation I cannot find. Can anyone help ?

+1 vote

I working on a project which needs adding a service with JNI to the system server and also a new daemon in init.rc script. I have successfully done this.
I might need the system service to periodically send SIGUSR1/2 signals to the daemon. Linux requires a sender of signals to be root. Do I have this privilege inside system server in Android?

0 votes

I need to show a dialog (more like a horizontal bar) on press of a custom Key (on my custom device powered by Android). This dialog should appear on top of any other application(say "A") that might be running when the Key is pressed.
The app "A" should keep on running and its UI should be visible (i.e the app "A: should not go to "_onPause_()"). It should work something similar to_ SystemUI_'s volume change dialog when Volume Hard Keys are pressed. I want to make minimum changes in framework.
My understanding is that I need to make changes in _PhoneWindowManager.java_ to handle the press of custom Key, which will then call my app residing in application layer, which will just inflate the dialog.
Would this work? If so, is there a better way to implement it? If not, how can I implement this?