android - 安卓怎么传感器数据?
迷茫
迷茫 2017-04-17 15:17:46
0
2
335

小组实验,编写安卓手机程序,自动收集手机传感器信息,例如,wifi、GPS、音量、重力加速度等信息。

这个要怎么学最快呢?我去网上找安卓教程,都是从UI布局,按钮触发事件开始讲的,我不需要UI,只要能采集传感器的数据就行了。

我习惯用C++,遇到java的程序,基本能看懂,看不懂的查资料。

求问我一定需要下一个安卓模拟器还是直接用我的小米手机测试(有一个闲置的手机)?
或者哪里有源代码可以直接研究?
感激不尽。

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(2)
PHPzhong

SensorManager can be used for the sensor part
Reference:
http://developer.android.com/reference/android/hardware/SensorManager.html
http://developer.android.com/guide/ topics/sensors/sensors_overview.html
WIFI information has WifiManager
Reference:
http://developer.android.com/reference/android/net/wifi/WifiManager.html

Google official documents are available.

黄舟

Reference: https://github.com/emotionsense/SensorManager
Someone has already built the wheel.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!