[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Android--Orientation--Sensor-green.svg?style=flat)](https://android-arsenal.com/details/1/2107)
[![The MIT License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/majidgolshadi/Android-Orientation-Sensor/blob/master/LICENSE)
Android-Orientation-Sensor
==========================
Android Sensor Orientation Library helps you to get more accurate vector values of orientation, using all available device sensors.
Overview
========
In one of my project (parallax library for android application) ,i need to use orientaion sensor values but they are too noisy so I decided to create a native library for android plateform to return these values with less noise.
My purpose for sharing this code in public is to solve anybody who has this problem like me.
To do this I use Accelerometer, Gyroscope, Magnetic and Orientation sensors values.
Usage
=====
to use this library you can add codes to your project and easily use it.
Create it's object
------------------
```java
Orientation orientationSensor = new Orientation(this.getApplicationContext(), this);
```
`this` stands for a class who implements OrientationSensorInterface class
Turn sensor ON
--------------
```java
//------Turn Orientation sensor ON-------
// set tolerance for any directions
orientationSensor.init(1.0, 1.0, 1.0);
// set output speed and turn initialized sensor on
// 0 Normal
// 1 UI
// 2 GAME
// 3 FASTEST
orientationSensor.on(0);
```
first it must be initialized. You can set delta value for any direction you want(e.g 1.0).
you can control your sensor pooling speed when you turn your sensor on
Turn sensor OFF
---------------
```java
orientationSensor.off();
```
if my introduction was not completely you can see TestActivity class that i put it in this project as a library usage sample.
I hope to this library helpful for any body that use it.
I'm realy happy to people who can help me to improve this code.
没有合适的资源?快使用搜索试试~ 我知道了~
Android Sensor Orientation Library 可帮助您获得更准确的方向矢量值 java
共13个文件
java:10个
gitignore:1个
license:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 52 浏览量
2022-07-13
18:51:18
上传
评论
收藏 14KB ZIP 举报
温馨提示
概述 在我的一个项目(android 应用程序的视差库)中,我需要使用方向传感器值,但它们太嘈杂,所以我决定为 android 平台创建一个本机库,以返回这些值的噪音更小。我公开共享此代码的目的是解决像我这样有此问题的任何人。为此,我使用加速度计、陀螺仪、磁性和方向传感器值。 用法 要使用这个库,您可以将代码添加到您的项目中并轻松使用它。 更多详情、使用方法,请下载后细读README.md文件
资源推荐
资源详情
资源评论
收起资源包目录
Android-Orientation-Sensor-master.zip (13个子文件)
Android-Orientation-Sensor
LICENSE 1KB
src
com
golshadi
orientationSensor
math
Matrix3x3.java 922B
sensors
Orientation.java 13KB
gyroscope.java 2KB
accelerometer.java 2KB
magnetic.java 2KB
Isensor.java 195B
utils
AppConstants.java 218B
OrientationSensorInterface.java 219B
responseProvider
orientationResponseProvider.java 2KB
TestActivity.java 1KB
.gitignore 534B
README.md 2KB
共 13 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功