{"id":18771683,"url":"https://github.com/majidgolshadi/android-orientation-sensor","last_synced_at":"2025-04-13T07:32:39.148Z","repository":{"id":21036380,"uuid":"24332979","full_name":"majidgolshadi/Android-Orientation-Sensor","owner":"majidgolshadi","description":"Android Sensor Orientation Library helps you to get more accurate vector values of orientation, using all available device sensors.","archived":false,"fork":false,"pushed_at":"2016-09-06T05:03:22.000Z","size":42,"stargazers_count":110,"open_issues_count":1,"forks_count":23,"subscribers_count":10,"default_branch":"master","last_synced_at":"2023-11-07T15:20:38.485Z","etag":null,"topics":["accelerometer","android-library","gyroscope","orientation","sensor"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/majidgolshadi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-22T14:57:44.000Z","updated_at":"2023-05-06T08:00:31.000Z","dependencies_parsed_at":"2022-08-30T20:00:23.124Z","dependency_job_id":null,"html_url":"https://github.com/majidgolshadi/Android-Orientation-Sensor","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majidgolshadi%2FAndroid-Orientation-Sensor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majidgolshadi%2FAndroid-Orientation-Sensor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majidgolshadi%2FAndroid-Orientation-Sensor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majidgolshadi%2FAndroid-Orientation-Sensor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/majidgolshadi","download_url":"https://codeload.github.com/majidgolshadi/Android-Orientation-Sensor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223575639,"owners_count":17167727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accelerometer","android-library","gyroscope","orientation","sensor"],"created_at":"2024-11-07T19:25:54.433Z","updated_at":"2024-11-07T19:25:54.978Z","avatar_url":"https://github.com/majidgolshadi.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Android--Orientation--Sensor-green.svg?style=flat)](https://android-arsenal.com/details/1/2107)\n[![The MIT License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/majidgolshadi/Android-Orientation-Sensor/blob/master/LICENSE)\n\nAndroid-Orientation-Sensor\n==========================\n\nAndroid Sensor Orientation Library helps you to get more accurate vector values of orientation, using all available device sensors.\n\nOverview\n========\nIn 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.\nMy purpose for sharing this code in public is to solve anybody who has this problem like me.\nTo do this I use Accelerometer, Gyroscope, Magnetic and Orientation sensors values.\n\nUsage\n=====\nto use this library you can add codes to your project and easily use it.\n\nCreate it's object\n------------------\n```java\nOrientation orientationSensor = new Orientation(this.getApplicationContext(), this);\n```\n`this` stands for a class who implements OrientationSensorInterface class\n\nTurn sensor ON\n--------------\n```java\n//------Turn Orientation sensor ON-------\n// set tolerance for any directions\norientationSensor.init(1.0, 1.0, 1.0);\n\n// set output speed and turn initialized sensor on\n// 0 Normal\n// 1 UI\n// 2 GAME\n// 3 FASTEST\norientationSensor.on(0);\n```\nfirst it must be initialized. You can set delta value for any direction you want(e.g 1.0).    \nyou can control your sensor pooling speed when you turn your sensor on\n\n\nTurn sensor OFF\n---------------\n```java\norientationSensor.off();\n```\n\nif my introduction was not completely you can see TestActivity class that i put it in this project as a library usage sample.    \nI hope to this library helpful for any body that use it.    \nI'm realy happy to people who can help me to improve this code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmajidgolshadi%2Fandroid-orientation-sensor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmajidgolshadi%2Fandroid-orientation-sensor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmajidgolshadi%2Fandroid-orientation-sensor/lists"}