美文网首页
NDK 遍历SensorList

NDK 遍历SensorList

作者: Kerwin_H | 来源:发表于2021-09-07 16:42 被阅读0次

通过C++遍历Android SensorList

#include <sensor.h>
ASensorManager *mpSensorManager;
ASensorList list2;
    int n = ASensorManager_getSensorList(mpSensorManager, &list2);
    printf("list = %d\n",n) ;
    for(int i=0;i<n;i++){
        printf("%d:type = %d\n",i,ASensor_getType(*(list2+i)));
    }

相关文章

网友评论

      本文标题:NDK 遍历SensorList

      本文链接:https://www.haomeiwen.com/subject/vyrpwltx.html