getScreenRotation function for Android
Posted: Thu Mar 14, 2013 10:48 pm
When working with Android sensors, it is necessary to know the current rotation of the screen from its "natural" orientation. Even if ZGE can specify either landscape or portrait orientation, "natural" orientation of each device can vary. Mobiles have usually portrait and tablets landscape orientation.
Android SDK provides the method Display.getRotation() which should be used for this purpose. I could implement its wrapper in ZGESensor library, but this would require usage of JNI and instantiation of another JVM, which is too cumbersome and not optimal for sure. (That's because NKD provides just a limited API and getRotation() was not included there.)
Ville, I expect that implementation of getScreenRotation() (or name it differently) function in ZGE would be technically more easier; similar to implementation of touchGet* functions. If so, I'm kindly asking you to add such a function to ZGE; it is really necessary for portable sensor-aware applications. Thanks.
Android SDK provides the method Display.getRotation() which should be used for this purpose. I could implement its wrapper in ZGESensor library, but this would require usage of JNI and instantiation of another JVM, which is too cumbersome and not optimal for sure. (That's because NKD provides just a limited API and getRotation() was not included there.)
Ville, I expect that implementation of getScreenRotation() (or name it differently) function in ZGE would be technically more easier; similar to implementation of touchGet* functions. If so, I'm kindly asking you to add such a function to ZGE; it is really necessary for portable sensor-aware applications. Thanks.