[Bf-committers] Sensors API for GE on Android

Alexandr Kuznetsov kuzsasha at gmail.com
Thu Jul 19 00:41:59 CEST 2012


Hi


Android and other mobile devices have different input methods than
traditional computers.


I wrote a mouse emulator which uses touch, but there still some problems.
For example, Android  knows the cursor position only when device is touch,
aka left mouse is pressed. Therefore, when we press in different places,
courses just jumps from one position to the next. Hopefully, it will be
less of a problem when we have multitouch API and can use explicitly use it
instead mouse emulator.


I want to add Accelerometer and Gyroscope this or next week. Accelerometer
and Gyroscope provide streams of information that can affect performance.
Therefore I think developers should explicitly enable and disable api.
dfelinto proposed those sensors should be implemented as python API first.
  For devices or OSs that don't have Accelerometer and Gyroscope, we can
provide fake api. Also, I think, gyroscope and accelerometer should use the
same api and be specified through enum and return a vector array of values.


How would you like to see this implemented? Also, do you want any data
conversions/helper functions? Gyroscope data is a little complicated:
http://developer.android.com/guide/topics/sensors/sensors_motion.html#sensors-motion-gyro



Best,

Alex


More information about the Bf-committers mailing list