Chinaunix首页 | 论坛 | 博客
  • 博客访问: 326221
  • 博文数量: 102
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 1146
  • 用 户 组: 普通用户
  • 注册时间: 2010-01-21 22:33
文章分类

全部博文(102)

文章存档

2011年(8)

2010年(94)

我的朋友

分类:

2010-01-23 20:41:24

这一系列的文章是自己前段时间学习android的一些小笔记,也算是资料收集。感兴趣的tx可以顺着看一下,需要详细讨论的朋友可以发信给我.有一些OMS平台的资料属于Borqs内部的,就无法分享了。

Java Native Interface Specification—Contents


jeffrey's documents about sensors layer:
.

1. The top ten things I learned about Android and the Dalvik VM 


JVM is a good box.

"A special strength of the platform is their attention to detail about reducing the cost of private pages. Many pages are read-only mapped from files, which means they can be dropped from RAM at a moment’s notice. Many other pages are shared with only rare use of copy-on-write (e.g., between JVMs). (This is similar to the work we have done on HotSpot with class data sharing.)"

2. 获取支持的sensor 列表
有篇小文:

irst, grab the SensorManager:

SensorManager sensorMgr = (SensorManager)
    context
.getSystemService(Context.SENSOR_SERVICE);

Next, get a list of supported sensors:

int sensorIds = sensorMgr.getSensors();

And finally, test if the device supports the sensor your application needs:

boolean deviceSupportsAccelerometer =
 
(sensorIds & SENSOR_ACCELEROMETER) == SENSOR_ACCELEROMETER;


但是在yamaha的code里对于支持的sensors tyeps是固定的.

jeffrey 说:
产品的module.so会扫描/sys/class/sensorssensors types,sensormamnager获取支持的sensors types时
会通过jni向module获取.

sensors manager里面,提供给app的接口是: /** @return available sensors.
     * @deprecated This method is deprecated, use
     * {@link SensorManager#getSensorList(int)} instead
     */
    @Deprecated
    public int getSensors() {
}
通过jni向module获取支持sensors的接口是:sensors_module_get_next_sensor()


附一篇和"雪计算"的文档
dalvik文档是borqs的,这个group是open的,决定发链接吧

阅读(880) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~