-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C++ sensor types #621
Comments
looks like pengxu owns both Sensor.java and sensor.h, so i've forwarded this internally... |
apparently ashutoshj was the right person to ask.
i'm told your assumption should be safe: the C++ values should be the same as the corresponding Java enum.
in the Java documentation.
no, but we'll add them to get the Sensors.java and sensors.h back in sync. |
Great! Thank you for your answer! |
did you notice anything else missing compared to the Java API, or was it just the constants? |
This matches Sensor.java (https://developer.android.com/reference/android/hardware/Sensor.html). I've included the types for a few of the easy cases, but I've added a link to the Java documentation for the rest: the Java documentation is much better and actively maintained. Duplicating it here doesn't seem worthwhile, and <android/multinetwork.h> already takes this approach. Bug: android/ndk#621 Test: builds Change-Id: Icffd85071e56bd7f45e8f3dc9d300a495859dbcb
Related question: #631 |
Test: ndk/checkbuild.py && ndk/validate.py Bug: android/ndk#621 Change-Id: I66503c08af191f519e2e2241c96a2cf4879dd2b2
This matches Sensor.java (https://developer.android.com/reference/android/hardware/Sensor.html). I've included the types for a few of the easy cases, but I've added a link to the Java documentation for the rest: the Java documentation is much better and actively maintained. Duplicating it here doesn't seem worthwhile, and <android/multinetwork.h> already takes this approach. Bug: android/ndk#621 Test: builds Change-Id: Icffd85071e56bd7f45e8f3dc9d300a495859dbcb
Description
I am looking for some information about sensor types that are not listen in the NDK documentation in ASENSOR_TYPE enum, but are available in Java (for example TYPE_ROTATION_VECTOR, TYPE_PRESSURE, TYPE_GRAVITY, etc.).
Besides not being int he documentation, they seem to work fine in C++ if we assume that their type ID-s are the same as in Java. I have tested if the provided sensor data is correct for TYPE_ROTATION_VECTOR, and it is working with no issues.
Also, if we print out the names and types of the sensors we get using ASensorManager_getSensorList(), they seem to match the Java type definitions.
So my questions are:
Code:
Output:
Environment Details
The text was updated successfully, but these errors were encountered: