这一系列的文章是自己前段时间学习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/sensors的sensors 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的,决定发链接吧
阅读(916) | 评论(0) | 转发(0) |