android - 如何获取 Android 的传感器值

标签 android c android-emulator kernel android-sensors

我目前正在为 android(tegra/goldfish 分支)构建 3.1 内核。我想用 C 编写一个程序来获取传感器值。我确实有 inc/hardware/sensors.h 和一些相关文件,但在尝试打开传感器设备时我总是遇到错误。

谢谢

最佳答案

查看与 NDK 一起打包的示例,尤其是 native-activity

关于android - 如何获取 Android 的传感器值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12667763/

相关文章:

android - 奥利奥中的 ACTION_PACKAGE_ADDED

安卓。启动 Google Play Music App 的目的是什么?

Android datepicker 自动更改年份和月份字段

c - DLL 未从 LabVIEW 写入 txt 文件?

android - onLocationChanged 永远不会被调用 Emulator

java - 创建一个可以使用开放街道 map 跟踪位置的应用程序

c - Lex/Yacc Flex/Bison : Precedence on reusing tokens for multiple production rules

c - atoi() 使程序崩溃

java - Android 货币显示 : Device vs. 模拟器

java - 从 Android 应用程序多次向 URL 发送请求的最佳方式是什么?