{"id":21650475,"url":"https://github.com/dhairya0907/react-native-compass","last_synced_at":"2026-05-07T01:07:00.210Z","repository":{"id":57681942,"uuid":"477008082","full_name":"dhairya0907/react-native-compass","owner":"dhairya0907","description":"Native android compass library for react-native","archived":false,"fork":false,"pushed_at":"2022-04-02T12:21:33.000Z","size":1675,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-23T17:51:57.455Z","etag":null,"topics":["android","compass","native","react-native"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@dhairyasharma/react-native-compass","language":"Kotlin","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/dhairya0907.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":"2022-04-02T09:28:58.000Z","updated_at":"2022-04-06T09:16:14.000Z","dependencies_parsed_at":"2022-09-03T19:52:14.752Z","dependency_job_id":null,"html_url":"https://github.com/dhairya0907/react-native-compass","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhairya0907%2Freact-native-compass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhairya0907%2Freact-native-compass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhairya0907%2Freact-native-compass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhairya0907%2Freact-native-compass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhairya0907","download_url":"https://codeload.github.com/dhairya0907/react-native-compass/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244536446,"owners_count":20468349,"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":["android","compass","native","react-native"],"created_at":"2024-11-25T07:40:32.747Z","updated_at":"2026-05-07T01:06:55.188Z","avatar_url":"https://github.com/dhairya0907.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `@dhairyasharma/react-native-compass`\n\n![Supports Android](https://img.shields.io/badge/platforms-android%20-lightgrey.svg) [ ![MIT License](https://img.shields.io/npm/l/@react-native-community/netinfo.svg) ](/LICENSE) ![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg) [ ![Maintainer](https://img.shields.io/badge/maintainer-dhairya0907-blue) ](https://github.com/dhairya0907) [![Generic badge](https://img.shields.io/badge/version-1.0.0-blue.svg)](https://github.com/dhairya0907/react-native-encryption/releases)\n\n[![Twitter](https://img.shields.io/badge/dhairya__0907-%231DA1F2.svg?style=for-the-badge\u0026logo=Twitter\u0026logoColor=white) ](https://twitter.com/dhairya_0907) [ ![LinkedIn](https://img.shields.io/badge/linkedin-%230077B5.svg?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white) ](https://www.linkedin.com/in/dhairyasharma0907/)\n\n### Native android compass library for react-native\n***Only supports Android, for IOS work is in progress.***\n\n\n\u0026nbsp;\n\n# Getting started\n\nInstall the library using either Yarn:\n\n```\nyarn add @dhairyasharma/react-native-compass\nyarn add react-native-shared-preferences@1.0.2\n```\n\nor npm:\n\n```sh\nnpm install --save @dhairyasharma/react-native-compass\nnpm install --save eact-native-shared-preferences@1.0.2\n```\n\nor git:\n\n```sh\nnpm install git+https://github.com/dhairya0907/react-native-compass.git\nnpm install git+https://github.com/sriraman/react-native-shared-preferences.git\n```\n\n### Using React Native \u003e= 0.60\n\n\u0026nbsp;\nLinking the package manually is not required anymore with [Autolinking](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md).\n\n\u0026nbsp;\n\n# Usage\n\n## Import the library\n\n```javascript\nimport { CompassModule, getDegree } from \"@dhairyasharma/react-native-compass\";\n```\n\n## Get compass\n```javascript\n\u003cCompassModule style={{height : \"100%\", width : \"100%\"}} handHeight={270} /\u003e\n\n// Here handHeight is the height of the hand in dp\n// And the style is the style of the compass\n// Try to call CompassModule in the end of the design, see example\n```\n\n## Get the compass Degree\n```javascript\ngetDegree().then(degree =\u003e {\n  console.log(degree);\n});\n```\n\n---\n\n**NOTE**\n\n**For detail usage see [example](https://github.com/dhairya0907/react-nativee-compass/blob/a593e7376c48a755a506f972949fe69c48f9aeba/example/src/App.tsx#L1).**\n\n---\n\n\u0026nbsp;\n\n# Acknowledgements\n- Module template by [react-native-module-template](https://github.com/demchenkoalex/react-native-module-template)\n\n\u0026nbsp;\n\n# Author\n\nDhairya Sharma | [@dhairya0907](https://github.com/dhairya0907)\n\n\u0026nbsp;\n\n# License\n\nThe library is released under the MIT license. For more information see [`LICENSE`](/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhairya0907%2Freact-native-compass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhairya0907%2Freact-native-compass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhairya0907%2Freact-native-compass/lists"}