Android-Orientation-Sensor


Source link: https://github.com/majidgolshadi/Android-Orientation-Sensor

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

Orientation orientationSensor = new Orientation(this.getApplicationContext(), this);

this stands for a class who implements OrientationSensorInterface class

Turn sensor ON

//------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

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.

Resources

Tiny library with ability to provide support for infinite paginated scrolling in RecyclerView. It is able to show loading & try again layout at the bottom of the list.

ShareLoginLib likes simple sharesdk or umeng in China . It is a tool to help developers to share their content (image , text or music ) to WeChat,Weibo and QQ.

IntentBuilder is a type safe way of creating intents and populating them with extras. Use them with your Activities and Services.

A button that shows custom drawables when entering a loading state.

Twitter Kit is a multi-module gradle project containing several Twitter SDKs including TweetComposer, TwitterCore, and TweetUi. It is built on the Fabric platform and uses many shared components.

This is An Easy Android Crash Handle Library. You can use it to collect crashes and store them on phone or send to server.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes