{"id":4550,"url":"https://github.com/react-native-device-info/react-native-device-info","last_synced_at":"2025-09-09T20:43:37.908Z","repository":{"id":37758088,"uuid":"42590985","full_name":"react-native-device-info/react-native-device-info","owner":"react-native-device-info","description":"Device Information for React Native iOS and Android","archived":false,"fork":false,"pushed_at":"2025-08-09T07:42:17.000Z","size":6912,"stargazers_count":6608,"open_issues_count":11,"forks_count":1478,"subscribers_count":73,"default_branch":"master","last_synced_at":"2025-09-06T11:17:01.537Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/react-native-device-info.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-09-16T14:06:22.000Z","updated_at":"2025-09-04T14:24:19.000Z","dependencies_parsed_at":"2023-11-28T13:47:20.703Z","dependency_job_id":"c0fdef52-cc5e-4d45-be88-0004b2821328","html_url":"https://github.com/react-native-device-info/react-native-device-info","commit_stats":{"total_commits":1221,"total_committers":325,"mean_commits":3.756923076923077,"dds":0.7010647010647011,"last_synced_commit":"b5517cbc1362792abe4f44a27ca03029f5c40b73"},"previous_names":["react-native-community/react-native-device-info","rebeccahughes/react-native-device-info"],"tags_count":231,"template":false,"template_full_name":null,"purl":"pkg:github/react-native-device-info/react-native-device-info","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-device-info%2Freact-native-device-info","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-device-info%2Freact-native-device-info/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-device-info%2Freact-native-device-info/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-device-info%2Freact-native-device-info/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-native-device-info","download_url":"https://codeload.github.com/react-native-device-info/react-native-device-info/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-device-info%2Freact-native-device-info/sbom","scorecard":{"id":765545,"data":{"date":"2025-08-11","repo":{"name":"github.com/react-native-device-info/react-native-device-info","commit":"36c0284f10675b79a591037619e79d54324f8bb6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Maintained","score":5,"reason":"0 commit(s) and 7 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":8,"reason":"binaries present in source code","details":["Warn: binary detected: android/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: example/android/gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":4,"reason":"Found 14/29 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/jest-test.yml:1","Warn: no topLevel permission defined: .github/workflows/linting.yml:1","Warn: no topLevel permission defined: .github/workflows/pr_title.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/stale.yml:1","Warn: no topLevel permission defined: .github/workflows/tests_e2e.yml:1","Warn: no topLevel permission defined: .github/workflows/windows-app-test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/jest-test.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/jest-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/jest-test.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/jest-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/linting.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/linting.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/linting.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/linting.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/linting.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/linting.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/linting.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/linting.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/linting.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/linting.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/linting.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/linting.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/linting.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/linting.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/linting.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/linting.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pr_title.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/pr_title.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/stale.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/stale.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:223: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:228: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:234: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:238: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:246: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:253: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:260: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:268: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:289: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:328: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:76: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:92: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:114: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:121: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:178: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests_e2e.yml:206: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/tests_e2e.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/windows-app-test.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/windows-app-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/windows-app-test.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/windows-app-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/windows-app-test.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/windows-app-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/windows-app-test.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/windows-app-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/windows-app-test.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/windows-app-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/windows-app-test.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/windows-app-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/windows-app-test.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/react-native-device-info/react-native-device-info/windows-app-test.yml/master?enable=pin","Info:   0 out of  28 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  15 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"60 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-c2jc-4fpr-4vhg","Warn: Project is vulnerable to: GHSA-crh6-fp67-6883","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-4w2v-q235-vp99","Warn: Project is vulnerable to: GHSA-cph5-m8f7-6c5x","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-7mhc-prgv-r3q4","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-w7q9-p3jq-fmhm","Warn: Project is vulnerable to: GHSA-xvf7-4v9q-58w6","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4","Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g","Warn: Project is vulnerable to: GHSA-56x4-j7p9-fcf9","Warn: Project is vulnerable to: GHSA-v78c-4p63-2j6c","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-x565-32qp-m3vf","Warn: Project is vulnerable to: GHSA-rxrc-rgv4-jpvx","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-pq67-2wwv-3xjx","Warn: Project is vulnerable to: GHSA-8cj5-5rvv-wf4v","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-rv73-9c8w-jp4c","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc","Warn: Project is vulnerable to: GHSA-5fg8-2547-mr8q","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp","Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T00:39:43.133Z","repository_id":37758088,"created_at":"2025-08-23T00:39:43.133Z","updated_at":"2025-08-23T00:39:43.133Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273997155,"owners_count":25204479,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["hacktoberfest"],"created_at":"2024-01-05T20:17:15.994Z","updated_at":"2025-09-09T20:43:37.883Z","avatar_url":"https://github.com/react-native-device-info.png","language":"TypeScript","funding_links":[],"categories":["Components","TypeScript","二、核心开发工具与库（按场景分类）","Uncategorized"],"sub_categories":["System","7. 系统功能（权限/设备信息）","Uncategorized"],"readme":"\u003c!-- markdownlint-disable MD024 MD034 MD033 --\u003e\n\n# react-native-device-info\n\n[![npm version](https://badge.fury.io/js/react-native-device-info.svg)](http://badge.fury.io/js/react-native-device-info)\n[![npm total downloads](https://img.shields.io/npm/dt/react-native-device-info.svg)](https://img.shields.io/npm/dt/react-native-device-info.svg)\n[![npm monthly downloads](https://img.shields.io/npm/dm/react-native-device-info.svg)](https://img.shields.io/npm/dm/react-native-device-info.svg)\n[![npm weekly downloads](https://img.shields.io/npm/dw/react-native-device-info.svg)](https://img.shields.io/npm/dw/react-native-device-info.svg)\n\nDevice Information for [React Native](https://github.com/facebook/react-native).\n\n## TOC\n\n- [Installation](#installation)\n- [Linking](#linking)\n- [Usage](#usage)\n- [API](#api)\n- [Hooks \u0026 Events](#hooks--events)\n- [Troubleshooting](#troubleshooting)\n- [Release Notes](#release-notes)\n- [react-native-dom / react-native-web](#react-native-dom)\n\n## v6 to v7 upgrade\n\nYour iOS Podfile will need to move to an iOS 10 minimum. v7 of this module no longer supports iOS9.\n\n## Installation\n\nUsing npm:\n\n```shell\nnpm install --save react-native-device-info\n```\n\nor using yarn:\n\n```shell\nyarn add react-native-device-info\n```\n\n## Proguard\n\nIf you want to use Install Referrer tracking, you will need to add this config to your Proguard config\n\n```\n-keep class com.android.installreferrer.api.** {\n  *;\n}\n```\n\nIf you are experiencing issues with hasGms() on your release apks, please add the following rule to your Proguard config\n\n```\n-keep class com.google.android.gms.common.** {*;}\n```\n\n## AndroidX Support\n\nThis module defaults to AndroidX you should configure your library versions similar to this in your `android/build.gradle` file's \"ext\" block\n\n\u003cdetails\u003e\n    \u003csummary\u003eAndroid\u003c/summary\u003e\n\n```gradle\n...\n  ext {\n    // dependency versions\n\n    We have 3 options for deviceId:\n    //Option 1 (latest):\n    firebaseIidVersion = \"19.0.1\" // default: \"19.0.1\"\n    //Option 2 (legacy GooglePlay dependency but using AndroidX):\n    googlePlayServicesIidVersion = \"17.0.0\" // default: \"17.0.0\" - AndroidX\n    //Option 3 (legacy GooglePlay dependency before AndroidX):\n    googlePlayServicesIidVersion = \"16.0.1\"\n\n\n    //include as needed:\n    compileSdkVersion = \"28\" // default: 28 (28 is required for AndroidX)\n    targetSdkVersion = \"28\" // default: 28 (28 is required for AndroidX)\n    supportLibVersion = '1.0.2' // Use '28.0.0' or don't specify for old libraries, '1.0.2' or similar for AndroidX\n    mediaCompatVersion = '1.0.1' // Do not specify if using old libraries, specify '1.0.1' or similar for androidx.media:media dependency\n    supportV4Version = '1.0.0' // Do not specify if using old libraries, specify '1.0.0' or similar for androidx.legacy:legacy-support-v4 dependency\n  }\n...\n```\n\n\u003c/details\u003e\n\nIf you need non-AndroidX you will need to use the jetifier package in reverse mode, documentation available with that package.\n\n## Linking\n\nLinking in native modules is a frequent source of trouble for new react-native developers, resulting in errors like \"RNDeviceInfo is null\" etc. For this reason automatic linking was implemented, and it should be used in your project.\n\nAutomatic linking is supported for all platforms (even windows on React native \u003e= 0.63!)\n\nPrevious versions need to do manual linking. No support is offered for these previous react-native versions but you may refer to older versions of this README if you like. _Upgrade to modern versions of react-native. Use `upgrade-helper` tool on the internet if needed._\n\n## Usage\n\n```js\nimport DeviceInfo from 'react-native-device-info';\n\n// or ES6+ destructured imports\n\nimport { getUniqueId, getManufacturer } from 'react-native-device-info';\n```\n\n## API\n\nNote that many APIs are platform-specific. If there is no implementation for a platform, then the \"default\" return values you will receive are `\"unknown\"` for string, `-1` for number, and `false` for boolean. Arrays and Objects will be empty (`[]` and `{}` respectively).\n\nMost APIs return a Promise but also have a corresponding API with `Sync` on the end that operates synchronously. For example, you may prefer to call `isCameraPresentSync()` during your app bootstrap to avoid async calls during the first parts of app startup.\n\n**Note about getUserAgentSync**\n\nWhile the asynchronous method `getUserAgent` is available on both platforms, `getUserAgentSync` is only supported on Android.\n\nThe example app in this repository shows an example usage of every single API, consult the example app if you have questions, and if you think you see a problem make sure you can reproduce it using the example app before reporting it, thank you.\n\n| Method                                                              | Return Type         |  iOS | Android | Windows | Web  | visionOS |\n| ------------------------------------------------------------------- | ------------------- | :--: | :-----: | :-----: | :-:  | :------: |\n| [getAndroidId()](#getandroidid)                                     | `Promise\u003cstring\u003e`   |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [getApiLevel()](#getapilevel)                                       | `Promise\u003cnumber\u003e`   |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [getApplicationName()](#getapplicationname)                         | `string`            |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [getAvailableLocationProviders()](#getAvailableLocationProviders)   | `Promise\u003cObject\u003e`   |  ✅  |   ✅    |   ❌     | ❌   |   ✅     |\n| [getBaseOs()](#getbaseOs)                                           | `Promise\u003cstring\u003e`   |  ❌  |   ✅    |   ✅     | ✅   |   ❌     |\n| [getBuildId()](#getbuildid)                                         | `Promise\u003cstring\u003e`   |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [getBatteryLevel()](#getbatterylevel)                               | `Promise\u003cnumber\u003e`   |  ✅  |   ✅    |   ✅     | ✅   |   ✅     |\n| [getBootloader()](#getbootloader)                                   | `Promise\u003cstring\u003e`   |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [getBrand()](#getbrand)                                             | `string`            |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [getBuildNumber()](#getbuildnumber)                                 | `string`            |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [getBundleId()](#getbundleid)                                       | `string`            |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [isCameraPresent()](#iscamerapresent)                               | `Promise\u003cboolean\u003e`  |  ❌  |   ✅    |   ✅     | ✅   |   ❌     |\n| [getCarrier()](#getcarrier)                                         | `Promise\u003cstring\u003e`   |  ✅  |   ✅    |   ❌     | ❌   |   ❌     |\n| [getCodename()](#getcodename)                                       | `Promise\u003cstring\u003e`   |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [getDevice()](#getdevice)                                           | `Promise\u003cstring\u003e`   |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [getDeviceId()](#getdeviceid)                                       | `string`            |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [getDeviceType()](#getDeviceType)                                   | `string`            |  ✅  |   ✅    |   ❌     | ❌   |   ✅     |\n| [getDisplay()](#getdisplay)                                         | `Promise\u003cstring\u003e`   |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [getDeviceName()](#getdevicename)                                   | `Promise\u003cstring\u003e`   |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [getDeviceToken()](#getdevicetoken)                                 | `Promise\u003cstring\u003e`   |  ✅  |   ❌    |   ❌     | ❌   |   ✅     |\n| [getFirstInstallTime()](#getfirstinstalltime)                       | `Promise\u003cnumber\u003e`   |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [getFingerprint()](#getfingerprint)                                 | `Promise\u003cstring\u003e`   |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [getFontScale()](#getfontscale)                                     | `Promise\u003cnumber\u003e`   |  ✅  |   ✅    |   ✅     | ❌   |   ❌     |\n| [getFreeDiskStorage()](#getfreediskstorage)                         | `Promise\u003cnumber\u003e`   |  ✅  |   ✅    |   ✅     | ✅   |   ✅     |\n| [getFreeDiskStorageOld()](#getfreediskstorageold)                   | `Promise\u003cnumber\u003e`   |  ✅  |   ✅    |   ✅     | ✅   |   ✅     |\n| [getHardware()](#gethardware)                                       | `Promise\u003cstring\u003e`   |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [getHost()](#gethost)                                               | `Promise\u003cstring\u003e`   |  ❌  |   ✅    |   ✅     | ❌   |   ❌     |\n| [getHostNames()](#getHostNames)                                     | `Promise\u003cstring[]\u003e` |  ❌  |   ❌    |   ✅     | ❌   |   ❌     |\n| [getIpAddress()](#getipaddress)                                     | `Promise\u003cstring\u003e`   |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [getIncremental()](#getincremental)                                 | `Promise\u003cstring\u003e`   |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [getInstallerPackageName()](#getinstallerpackagename)               | `Promise\u003cstring\u003e`   |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [getInstallReferrer()](#getinstallreferrer)                         | `Promise\u003cstring\u003e`   |  ❌  |   ✅    |   ✅     | ✅   |   ❌     |\n| [getInstanceId()](#getinstanceid)                                   | `Promise\u003cstring\u003e`   |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [getLastUpdateTime()](#getlastupdatetime)                           | `Promise\u003cnumber\u003e`   |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [getMacAddress()](#getmacaddress)                                   | `Promise\u003cstring\u003e`   |  ✅  |   ✅    |   ❌     | ❌   |   ✅     |\n| [getManufacturer()](#getmanufacturer)                               | `Promise\u003cstring\u003e`   |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [getMaxMemory()](#getmaxmemory)                                     | `Promise\u003cnumber\u003e`   |  ❌  |   ✅    |   ✅     | ✅   |   ❌     |\n| [getModel()](#getmodel)                                             | `string`            |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [getPowerState()](#getpowerstate)                                   | `Promise\u003cobject\u003e`   |  ✅  |   ✅    |   ✅     | ✅   |   ✅     |\n| [getProduct()](#getproduct)                                         | `Promise\u003cstring\u003e`   |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [getPreviewSdkInt()](#getPreviewSdkInt)                             | `Promise\u003cnumber\u003e`   |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [getReadableVersion()](#getreadableversion)                         | `string`            |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [getSerialNumber()](#getserialnumber)                               | `Promise\u003cstring\u003e`   |  ❌  |   ✅    |   ✅     | ❌   |   ❌     |\n| [getSecurityPatch()](#getsecuritypatch)                             | `Promise\u003cstring\u003e`   |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [getStartupTime()](#getstartuptime)                                 | `Promise\u003cnumber\u003e`   |  ✅  |   ✅    |   ❌     | ❌   |   ✅     |\n| [getSystemAvailableFeatures()](#getSystemAvailableFeatures)         | `Promise\u003cstring[]\u003e` |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [getSystemName()](#getsystemname)                                   | `string`            |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [getSystemVersion()](#getsystemversion)                             | `string`            |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [getTags()](#gettags)                                               | `Promise\u003cstring\u003e`   |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [getType()](#gettype)                                               | `Promise\u003cstring\u003e`   |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [getTotalDiskCapacity()](#gettotaldiskcapacity)                     | `Promise\u003cnumber\u003e`   |  ✅  |   ✅    |   ✅     | ✅   |   ✅     |\n| [getTotalDiskCapacityOld()](#gettotaldiskcapacityold)               | `Promise\u003cnumber\u003e`   |  ✅  |   ✅    |   ✅     | ✅   |   ✅     |\n| [getTotalMemory()](#gettotalmemory)                                 | `Promise\u003cnumber\u003e`   |  ✅  |   ✅    |   ❌     | ✅   |   ✅     |\n| [getUniqueId()](#getuniqueid)                                       | `Promise\u003cstring\u003e`   |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [getUsedMemory()](#getusedmemory)                                   | `Promise\u003cnumber\u003e`   |  ✅  |   ✅    |   ✅     | ✅   |   ✅     |\n| [getUserAgent()](#getuseragent)                                     | `Promise\u003cstring\u003e`   |  ✅  |   ✅    |   ❌     | ✅   |   ✅     |\n| [getUserAgentSync()](#getuseragent)                                 | `string`            |  ❌  |   ✅    |   ❌     | ✅   |   ❌     |\n| [getVersion()](#getversion)                                         | `string`            |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [getBrightness()](#getBrightness)                                   | `Promise\u003cnumber\u003e`   |  ✅  |   ❌    |   ❌     | ❌   |   ❌     |\n| [hasGms()](#hasGms)                                                 | `Promise\u003cboolean\u003e`  |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [hasHms()](#hasHms)                                                 | `Promise\u003cboolean\u003e`  |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [hasNotch()](#hasNotch)                                             | `boolean`           |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [hasDynamicIsland()](#hasDynamicIsland)                             | `boolean`           |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [hasSystemFeature()](#hassystemfeaturefeature)                      | `Promise\u003cboolean\u003e`  |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [isAirplaneMode()](#isairplanemode)                                 | `Promise\u003cboolean\u003e`  |  ❌  |   ✅    |   ❌     | ✅   |   ❌     |\n| [isBatteryCharging()](#isbatterycharging)                           | `Promise\u003cboolean\u003e`  |  ✅  |   ✅    |   ✅     | ✅   |   ✅     |\n| [isEmulator()](#isemulator)                                         | `Promise\u003cboolean\u003e`  |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [isKeyboardConnected()](#iskeyboardconnected)                       | `Promise\u003cbool\u003e`     |  ❌  |   ❌    |   ✅     | ❌   |   ❌     |\n| [isLandscape()](#isLandscape)                                       | `Promise\u003cboolean\u003e`  |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [isLocationEnabled()](#isLocationEnabled)                           | `Promise\u003cboolean\u003e`  |  ✅  |   ✅    |   ❌     | ✅   |   ✅     |\n| [isMouseConnected()](#ismouseconneted)                              | `Promise\u003cbool\u003e`     |  ❌  |   ❌    |   ✅     | ❌   |   ❌     |\n| [isHeadphonesConnected()](#isHeadphonesConnected)                   | `Promise\u003cboolean\u003e`  |  ✅  |   ✅    |   ❌     | ❌   |   ✅     |\n| [isWiredHeadphonesConnected()](#isWiredHeadphonesConnected)         | `Promise\u003cboolean\u003e`  |  ✅  |   ✅    |   ❌     | ❌   |   ✅     |\n| [isBluetoothHeadphonesConnected()](#isBluetoothHeadphonesConnected) | `Promise\u003cboolean\u003e`  |  ✅  |   ✅    |   ❌     | ❌   |   ✅     |\n| [isPinOrFingerprintSet()](#ispinorfingerprintset)                   | `Promise\u003cboolean\u003e`  |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [isTablet()](#istablet)                                             | `boolean`           |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [isLowRamDevice()](#istablet)                                       | `boolean`           |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [isDisplayZoomed()](#isdisplayzoomed)                               | `boolean`           |  ✅  |   ❌    |   ❌     | ❌   |   ❌     |\n| [isTabletMode()](#istabletmode)                                     | `Promise\u003cbool\u003e`     |  ❌  |   ❌    |   ✅     | ❌   |   ❌     |\n| [supported32BitAbis()](#supported32BitAbis)                         | `Promise\u003cstring[]\u003e` |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [supported64BitAbis()](#supported64BitAbis)                         | `Promise\u003cstring[]\u003e` |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n| [supportedAbis()](#supportedAbis)                                   | `Promise\u003cstring[]\u003e` |  ✅  |   ✅    |   ✅     | ❌   |   ✅     |\n| [syncUniqueId()](#syncuniqueid)                                     | `Promise\u003cstring\u003e`   |  ✅  |   ❌    |   ❌     | ❌   |   ✅     |\n| [getSupportedMediaTypeList()](#getSupportedMediaTypeList)           | `Promise\u003cstring[]\u003e` |  ❌  |   ✅    |   ❌     | ❌   |   ❌     |\n\n---\n\n### getApiLevel()\n\nGets the API level.\n\n#### Examples\n\n```js\nDeviceInfo.getApiLevel().then((apiLevel) =\u003e {\n  // iOS: ?\n  // Android: 25\n  // Windows: ?\n});\n```\n\n#### Notes\n\n\u003e See [API Levels](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\n---\n\n### getAndroidId()\n\nGets the ANDROID_ID. See [API documentation](https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID) for appropriate use.\n\n#### Examples\n\n```js\nDeviceInfo.getAndroidId().then((androidId) =\u003e {\n  // androidId here\n});\n```\n\n---\n\n### getApplicationName()\n\nGets the application name.\n\n#### Examples\n\n```js\nlet appName = DeviceInfo.getApplicationName();\n// AwesomeApp\n```\n\n---\n\n### getBaseOs()\n\nThe base OS build the product is based on.\n\n#### Examples\n\n```js\nDeviceInfo.getBaseOs().then((baseOs) =\u003e {\n  // \"Windows\", \"Android\" etc\n});\n```\n\n---\n\n### getBatteryLevel()\n\nGets the battery level of the device as a float comprised between 0 and 1.\n\n#### Examples\n\n```js\nDeviceInfo.getBatteryLevel().then((batteryLevel) =\u003e {\n  // 0.759999\n});\n```\n\n#### Notes\n\n\u003e To be able to get actual battery level enable battery monitoring mode for application.\n\u003e Add this code:\n\n```objective-c\n[UIDevice currentDevice].batteryMonitoringEnabled = true;\n```\n\n\u003e to AppDelegate.m application:didFinishLaunchingWithOptions:\n\u003e\n\u003e Returns -1 on the iOS Simulator\n\n---\n\n### getBootloader()\n\nThe system bootloader version number.\n\n#### Examples\n\n```js\nDeviceInfo.getBootloader().then((bootloader) =\u003e {\n  // \"mw8998-002.0069.00\"\n});\n```\n\n---\n\n### getBrand()\n\nGets the device brand.\n\n#### Examples\n\n```js\nlet brand = DeviceInfo.getBrand();\n// iOS: \"Apple\"\n// Android: \"xiaomi\"\n// Windows: ?\n```\n\n---\n\n### getBuildNumber()\n\nGets the application build number.\n\n#### Examples\n\n```js\nlet buildNumber = DeviceInfo.getBuildNumber();\n// iOS: \"89\"\n// Android: \"4\"\n// Windows: ?\n```\n\n---\n\n### getBundleId()\n\nGets the application bundle identifier.\n\n#### Examples\n\n```js\nlet bundleId = DeviceInfo.getBundleId();\n// \"com.example.AwesomeApp\"\n```\n\n---\n\n### isCameraPresent()\n\nTells if the device has any camera now.\n\n#### Examples\n\n```js\nDeviceInfo.isCameraPresent()\n  .then((isCameraPresent) =\u003e {\n    // true or false\n  })\n  .catch((cameraAccessException) =\u003e {\n    // is thrown if a camera device could not be queried or opened by the CameraManager on Android\n  });\n```\n\n#### Notes\n\n\u003e - Hot add/remove of camera is supported.\n\u003e - Returns the status of the physical presence of the camera. If camera present but your app don't have permissions to use it, isCameraPresent will still return the true\n\n---\n\n### getCarrier()\n\nGets the carrier name (network operator).\n\n#### Examples\n\n```js\nDeviceInfo.getCarrier().then((carrier) =\u003e {\n  // \"SOFTBANK\"\n});\n```\n\n---\n\n### getCodename()\n\nThe current development codename, or the string \"REL\" if this is a release build.\n\n#### Examples\n\n```js\nDeviceInfo.getCodename().then((codename) =\u003e {\n  // \"REL\"\n});\n```\n\n---\n\n### getDevice()\n\nThe name of the industrial design.\n\n#### Examples\n\n```js\nDeviceInfo.getDevice().then((device) =\u003e {\n  // \"walleye\"\n});\n```\n\n---\n\n### getDeviceId()\n\nGets the device ID.\n\n#### Examples\n\n```js\nlet deviceId = DeviceInfo.getDeviceId();\n// iOS: \"iPhone7,2\"\n// Android: \"goldfish\"\n// Windows: \"Y3R94UC#AC4\"\n```\n\n---\n\n### getDisplay()\n\nA build ID string meant for displaying to the user.\n\n#### Examples\n\n```js\nDeviceInfo.getDisplay().then((display) =\u003e {\n  // \"OPM2.171026.006.G1\"\n});\n```\n\n---\n\n### getDeviceName()\n\nGets the device name.\n\n#### Examples\n\n```js\nDeviceInfo.getDeviceName().then((deviceName) =\u003e {\n  // iOS: \"Becca's iPhone 6\"\n  // Android: ?\n  // Windows: ?\n});\n```\n\nThis used to require the android.permission.BLUETOOTH but the new implementation in v3 does not need it. You may remove that from your AndroidManifest.xml if you had it for this API. iOS 16 and greater [require entitlements]([url](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_device-information_user-assigned-device-name)) to access user-defined device name, otherwise a generic value is returned (ie. 'iPad', 'iPhone')\n\n---\n\n### getDeviceToken()\n\nGets the device token (see [DeviceCheck](https://developer.apple.com/documentation/devicecheck)). Only available for iOS 11.0+ on real devices.\nThis will reject the promise when getDeviceToken is not supported, be careful with exception handling.\n\n#### Examples\n\n```js\nDeviceInfo.getDeviceToken().then((deviceToken) =\u003e {\n  // iOS: \"a2Jqsd0kanz...\"\n});\n```\n\n---\n\n### getFirstInstallTime()\n\nGets the time at which the app was first installed, in milliseconds.\n\n#### Examples\n\n```js\nDeviceInfo.getFirstInstallTime().then((firstInstallTime) =\u003e {\n  // Android: 1517681764528\n});\n```\n\n---\n\n### getFingerprint()\n\nA string that uniquely identifies this build.\n\n#### Examples\n\n```js\nDeviceInfo.getFingerprint().then((fingerprint) =\u003e {\n  // \"google/walleye/walleye:8.1.0/OPM2.171026.006.G1/4820017:user/release-keys\"\n});\n```\n\n---\n\n### getFontScale()\n\nGets the device font scale.\nThe font scale is the ratio of the current system font to the \"normal\" font size, so if normal text is 10pt and the system font is currently 15pt, the font scale would be 1.5\nThis can be used to determine if accessability settings has been changed for the device; you may want to re-layout certain views if the font scale is significantly larger ( \u003e 2.0 )\n\n#### Examples\n\n```js\nDeviceInfo.getFontScale().then((fontScale) =\u003e {\n  // 1.2\n});\n```\n\n---\n\n### getFreeDiskStorage()\n\nMethod that gets available storage size, in bytes, taking into account both root and data file systems calculation.\n\nOn **iOS**, this method accepts the following optional arguments:\n- `'total'`: Uses `volumeAvailableCapacityKey`\n- `'important'`: Uses `volumeAvailableCapacityForImportantUsageKey`\n- `'opportunistic'`: Uses `volumeAvailableCapacityForOpportunisticUsageKey`\n\nFor more details, refer to [Apple Documentation on Checking Volume Storage Capacity](https://developer.apple.com/documentation/foundation/urlresourcekey/checking_volume_storage_capacity).\n\n#### Examples\n\n```js\nDeviceInfo.getFreeDiskStorage().then((freeDiskStorage) =\u003e {\n  // Android: 17179869184\n  // iOS: 17179869184\n});\n\nDeviceInfo.getFreeDiskStorage('important').then((freeDiskStorage) =\u003e {\n  // iOS: 18198219342 (important storage)\n});\n```\n\n#### Notes\n\nThe API used by this method for Android was changed in [v6.0.0](https://github.com/react-native-device-info/react-native-device-info/releases/tag/v6.0.0). The older version has been maintained below as `getFreeDiskStorageOld()`. On iOS, `getFreeDiskStorage()` and `getFreeDiskStorageOld()` return the same value.\n\n---\n\n### getFreeDiskStorageOld()\n\nOld implementation of method that gets available storage size, in bytes.\n\n#### Examples\n\n```js\nDeviceInfo.getFreeDiskStorageOld().then((freeDiskStorage) =\u003e {\n  // Android: 17179869184\n  // iOS: 17179869184\n});\n```\n\n#### Notes\n\n\u003e From [developer.android.com](\u003chttps://developer.android.com/reference/android/os/Environment.html#getExternalStorageDirectory()\u003e):\n\u003e\n\u003e This method was deprecated in API level 29.\n\u003e\n\u003e Return the primary shared/external storage directory.\n\u003e\n\u003e Note: don't be confused by the word \"external\" here. This directory can better be thought as\n\u003e media/shared storage. It is a filesystem that can hold a relatively large amount of data and\n\u003e that is shared across all applications (does not enforce permissions). Traditionally this is\n\u003e an SD card, but it may also be implemented as built-in storage in a device that is distinct\n\u003e from the protected internal storage and can be mounted as a filesystem on a computer.\n\n---\n\n### getHardware()\n\nThe name of the hardware (from the kernel command line or /proc).\n\n#### Examples\n\n```js\nDeviceInfo.getHardware().then(hardware =\u003e {\n  // \"walleye\"\n});\n```\n\n---\n\n### getHost()\n\nHostname\n\n#### Examples\n\n```js\nDeviceInfo.getHost().then((host) =\u003e {\n  // \"wprd10.hot.corp.google.com\"\n});\n```\n\n---\n\n### getIpAddress()\n\n**Deprecated** Gets the device current IP address. (of wifi only)\nSwitch to [react-native-netinfo/netinfo](https://github.com/react-native-netinfo/react-native-netinfo) or [react-native-network-info](https://github.com/pusherman/react-native-network-info)\n\n#### Examples\n\n```js\nDeviceInfo.getIpAddress().then((ip) =\u003e {\n  // \"92.168.32.44\"\n});\n```\n\n#### Android Permissions\n\n- [android.permission.ACCESS_WIFI_STATE](https://developer.android.com/reference/android/Manifest.permission.html#ACCESS_WIFI_STATE)\n\n#### Notes\n\n\u003e Support for iOS was added in 0.22.0\n\n---\n\n### getIncremental()\n\nThe internal value used by the underlying source control to represent this build.\n\n#### Examples\n\n```js\nDeviceInfo.getIncremental().then((incremental) =\u003e {\n  // \"4820017\"\n});\n```\n\n---\n\n### getInstallerPackageName()\n\nThe internal value used by the underlying source control to represent this build.\n\n#### Examples\n\n```js\nDeviceInfo.getInstallerPackageName().then((installerPackageName) =\u003e {\n  // Play Store: \"com.android.vending\"\n  // Amazon: \"com.amazon.venezia\"\n  // Samsung App Store: \"com.sec.android.app.samsungapps\"\n  // iOS: \"AppStore\", \"TestFlight\", \"Other\"\n});\n```\n\n---\n\n### getInstallReferrer()\n\nGets the referrer string upon application installation.\n\n#### Examples\n\n```js\nDeviceInfo.getInstallReferrer().then((installReferrer) =\u003e {\n  // If the app was installed from https://play.google.com/store/apps/details?id=com.myapp\u0026referrer=my_install_referrer\n  // the result will be \"my_install_referrer\"\n});\n```\n\n---\n\n### getInstanceId()\n\nGets the application instance ID.\n\nThis attempts to get an instance ID from these sources, in this order:\n\n- a value under key `instanceId` in SharedPreferences file `react-native-device-info`\n- Firebase IID (if `firebaseBomVersion` or `firebaseIidVersion` is defined in gradle ext - **deprecated**)\n- GMS IID (if `googlePlayServicesIidVersion` or `googlePlayServicesVersion` is defined in gradle ext - **deprecated**)\n- a random UUID generated from java.util.UUID.randomUUID() and stored in SharedPreferences\n\nIf you are using the deprecated sources, the instance ID generated is stored in shared preferences so it will be stable during this major version of react-native-device-info.\n\nIn a future version of react-native-device-info, the Firebase IID and GMS IID implementations will be removed, and all future values will be the value (if any) stored in SharedPreferences, or a new random UUID that will then be stored and used for that app installation in the future.\n\n#### Examples\n\n```js\nDeviceInfo.getInstanceId().then((instanceId) =\u003e {\n  // Android: da4e0245-5d6c-402a-a07c-0c5349f229e2\n});\n```\n\n#### Notes\n\n\u003e See https://developers.google.com/instance-id/\n\n---\n\n### getLastUpdateTime()\n\nGets the time at which the app was last updated, in milliseconds.\n\n#### Examples\n\n```js\nDeviceInfo.getLastUpdateTime().then((lastUpdateTime) =\u003e {\n  // Android: 1517681764992\n});\n```\n\n---\n\n### getMacAddress()\n\nGets the network adapter MAC address.\n\n#### Examples\n\n```js\nDeviceInfo.getMacAddress().then((mac) =\u003e {\n  // \"E5:12:D8:E5:69:97\"\n});\n```\n\n#### Android Permissions\n\n- [android.permission.ACCESS_WIFI_STATE](https://developer.android.com/reference/android/Manifest.permission.html#ACCESS_WIFI_STATE)\n\n#### Notes\n\n\u003e iOS: This method always return \"02:00:00:00:00:00\" as retrieving the MAC address is [disabled since iOS 7](https://developer.apple.com/library/archive/releasenotes/General/WhatsNewIniOS/Articles/iOS7.html#//apple_ref/doc/uid/TP40013162-SW34)\n\n---\n\n### getManufacturer()\n\nGets the device manufacturer.\n\n#### Examples\n\n```js\nDeviceInfo.getManufacturer().then((manufacturer) =\u003e {\n  // iOS: \"Apple\"\n  // Android: \"Google\"\n  // Windows: ?\n});\n```\n\n---\n\n### getMaxMemory()\n\nReturns the maximum amount of memory that the VM will attempt to use, in bytes.\n\n#### Examples\n\n```js\nDeviceInfo.getMaxMemory().then((maxMemory) =\u003e {\n  // 402653183\n});\n```\n\n---\n\n### getModel()\n\nGets the device model.\n\n**iOS warning:** The list with device names is maintained by the community and could lag new devices. It is recommended to use `getDeviceId()` since it's more reliable and always up-to-date with new iOS devices. We do accept pull requests that add new iOS devices to the list with device names.\n\n#### Examples\n\n```js\nlet model = DeviceInfo.getModel();\n// iOS: ?\n// Android: ?\n// Windows: ?\n```\n\n---\n\n### getPhoneNumber()\n\nThe getPhoneNumber() has been removed. This method uses deprecated Android APIs. You can use react-native-sim-cards-manager to get the phone number.\n\n---\n\n### getPowerState()\n\nGets the power state of the device including the battery level, whether it is plugged in, and if the system is currently operating in low power mode.\nDisplays a warning on iOS if battery monitoring not enabled, or if attempted on an emulator (where monitoring is not possible)\n\n#### Examples\n\n```js\nDeviceInfo.getPowerState().then((state) =\u003e {\n  // {\n  //   batteryLevel: 0.759999,\n  //   batteryState: 'unplugged',\n  //   lowPowerMode: false,\n  // }\n});\n```\n\n---\n\n### getProduct()\n\nThe name of the overall product.\n\n#### Examples\n\n```js\nDeviceInfo.getProduct().then((product) =\u003e {\n  // \"walleye\"\n});\n```\n\n---\n\n### getPreviewSdkInt()\n\nThe developer preview revision of a prerelease SDK.\n\n#### Examples\n\n```js\nDeviceInfo.getPreviewSdkInt().then((previewSdkInt) =\u003e {\n  // 0\n});\n```\n\n---\n\n### getReadableVersion()\n\nGets the application human readable version (same as getVersion() + '.' + getBuildNumber())\n\n#### Examples\n\n```js\nlet readableVersion = DeviceInfo.getReadableVersion();\n// iOS: 1.0.1.32\n// Android: 1.0.1.234\n// Windows: ?\n```\n\n---\n\n### getSerialNumber()\n\nGets the device serial number. Will be 'unknown' in almost all cases [unless you have a privileged app and you know what you're doing](\u003chttps://developer.android.com/reference/android/os/Build.html#getSerial()\u003e).\n\n#### Examples\n\n```js\nDeviceInfo.getSerialNumber().then((serialNumber) =\u003e {\n  // iOS: unknown\n  // Android: ? (maybe a serial number, if your app is privileged)\n  // Windows: ? (a serial number, if your app has the \"capability smbios\")\n});\n```\n\n## Notes\n\n### capability smbios\n\nIf you want to use this method in windows, you have to add smbios capability in your aplication. Please following this [documentation](https://docs.microsoft.com/en-us/windows/win32/sysinfo/access-smbios-information-from-a-universal-windows-app) for add the capability in your manifest file.\n\n---\n\n### getSecurityPatch()\n\nThe user-visible security patch level.\n\n#### Examples\n\n```js\nDeviceInfo.getSecurityPatch().then((securityPatch) =\u003e {\n  // \"2018-07-05\"\n});\n```\n\n---\n\n### getSystemName()\n\nGets the device OS name.\n\n#### Examples\n\n```js\nlet systemName = DeviceInfo.getSystemName();\n// iOS: \"iOS\" on newer iOS devices \"iPhone OS\" on older devices (including older iPad models), \"iPadOS\" for iPads using iPadOS 15.0 or higher.\n// Android: \"Android\"\n// Windows: ?\n```\n\n---\n\n### getStartupTime()\n\nGets the time at which the current app process was started, in milliseconds.\n\n#### Examples\n\n```js\nDeviceInfo.getStartupTime().then((startupTime) =\u003e {\n  // Android: 1517681764528\n  // iOS: 1517681764528\n});\n```\n\n---\n\n### getSystemVersion()\n\nGets the device OS version.\n\n#### Examples\n\n```js\nlet systemVersion = DeviceInfo.getSystemVersion();\n// iOS: \"11.0\"\n// Android: \"7.1.1\"\n// Windows: ?\n```\n\n---\n\n### getBuildId()\n\nGets build number of the operating system.\n\n#### Examples\n\n```js\nDeviceInfo.getBuildId().then((buildId) =\u003e {\n  // iOS: \"12A269\"\n  // tvOS: not available\n  // Android: \"13D15\"\n  // Windows: not available\n});\n```\n\n---\n\n### getTags()\n\nComma-separated tags describing the build.\n\n#### Examples\n\n```js\nDeviceInfo.getTags().then((tags) =\u003e {\n  // \"release-keys, unsigned, debug\",\n});\n```\n\n---\n\n### getType()\n\nThe type of build.\n\n#### Examples\n\n```js\nDeviceInfo.getType().then((type) =\u003e {\n  // \"user\", \"eng\"\n});\n```\n\n---\n\n### getTotalDiskCapacity()\n\nMethod that gets full disk storage size, in bytes, taking into account both root and data file systems calculation.\n\n#### Examples\n\n```js\nDeviceInfo.getTotalDiskCapacity().then((capacity) =\u003e {\n  // Android: 17179869184\n  // iOS: 17179869184\n});\n```\n\n#### Notes\n\nThe API used by this method for Android was changed in [v6.0.0](https://github.com/react-native-device-info/react-native-device-info/releases/tag/v6.0.0). The older version has been maintained below as `getTotalDiskCapacityOld()`. On iOS, `getTotalDiskCapacity()` and `getTotalDiskCapacityOld()` return the same value.\n\n---\n\n### getTotalDiskCapacityOld()\n\nOld implementation of method that gets full disk storage size, in bytes.\n\n#### Examples\n\n```js\nDeviceInfo.getTotalDiskCapacityOld().then((capacity) =\u003e {\n  // Android: 17179869184\n  // iOS: 17179869184\n});\n```\n\n---\n\n### getTotalMemory()\n\nGets the device total memory, in bytes.\n\n#### Examples\n\n```js\nDeviceInfo.getTotalMemory().then((totalMemory) =\u003e {\n  // 1995018240\n});\n```\n\n---\n\n### getUniqueId()\n\n_This identifier is considered sensitive information in some app stores (e.g. Huawei or Google Play) and may lead to your app being removed or rejected, if used without user consent or for unapproved purposes. Refer to store policies for more information (see notes below)._\n\nGets the device unique ID.\nOn Android it is currently identical to `getAndroidId()` in this module.\nOn iOS it uses the `DeviceUID` uid identifier.\nOn Windows it uses `Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation.id`.\n\n#### Examples\n\n```js\nDeviceInfo.getUniqueId().then((uniqueId) =\u003e {\n// iOS: \"FCDBD8EF-62FC-4ECB-B2F5-92C9E79AC7F9\"\n// Android: \"dd96dec43fb81c97\"\n// Windows: \"{2cf7cb3c-da7a-d508-0d7f-696bb51185b4}\"\n});\n```\n\n#### Notes\n\n\u003e - iOS: This is [`IDFV`](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor) or a random string if IDFV is unavaliable. Once UID is generated it is stored in iOS Keychain and NSUserDefaults. So it would stay the same even if you delete the app or reset IDFV. You can _carefully_ consider it a persistent unique ID. It can be changed only in case someone manually override values in Keychain/NSUserDefaults or if Apple would change Keychain and NSUserDefaults implementations.\n\u003e   Beware: The IDFV is calculated using your bundle identifier and thus will be different in app extensions.\n\u003e - android: Prior to Oreo, this id ([ANDROID_ID](https://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID)) will always be the same once you set up your phone.\n\u003e - android: [Google Play policy](https://support.google.com/googleplay/android-developer/answer/10144311), see \"persistent device identifiers\". [Huawei - AppGallery Review Guidelines](https://developer.huawei.com/consumer/en/doc/30202) see \"permanent device identifier\" and \"obtaining user consent\".\n\n---\n\n### syncUniqueId()\n\nThis method is intended for iOS.\n\nThis synchronizes uniqueId with [`IDFV`](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor) or sets new a random string.\n\nOn iOS it uses the `DeviceUID` uid identifier.\nOn other platforms it just call `getUniqueId()` in this module.\n\n#### Examples\n\n```js\nDeviceInfo.syncUniqueId().then((uniqueId) =\u003e {\n  // iOS: \"FCDBD8EF-62FC-4ECB-B2F5-92C9E79AC7F9\"\n  // Android: \"dd96dec43fb81c97\"\n  // Windows: ?\n});\n```\n\n#### Notes\n\n\u003e - If user moved or restored data from one iOS device to second iOS device then he will have two different devices with same `uniqueId` in Keychain/NSUserDefaults. User can call `syncUniqueId()` on new iOS device. That will update his `uniqueId` from [`IDFV`](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor) or a random string.\n\n---\n\n### getUsedMemory()\n\nGets the app memory usage, in bytes.\n\n⚠️ [A note from the Android docs.](https://developer.android.com/reference/android/app/ActivityManager#getProcessMemoryInfo(int%5B%5D))\n\u003e Note: this method is only intended for debugging or building a user-facing process management UI.\n\n#### Examples\n\n```js\nDeviceInfo.getUsedMemory().then((usedMemory) =\u003e {\n  // 23452345\n});\n```\n\n---\n\n### getSupportedMediaTypeList()\nThis method gets the list of supported media codecs.\n#### Examples\n```js\nDeviceInfo.getSupportedMediaTypeList().then((string[]) =\u003e {\n  // [\"audio/mpeg\", \"audio/mp4a-latm\", \"audio/mp4a-latm\", \"audio/mp4a-latm\", \"audio/mp4a-latm\", \"video/avc\", \"video/3gpp\", \"video/hevc\", \"video/mp4v-es\", \"video/av01\", \"video/avc\", \"video/avc\", \"video/avc\", \"video/avc\"]\n});\n```\n---\n\n### getUserAgent()\n\nGets the device User Agent.\n\n#### Examples\n\n```js\nDeviceInfo.getUserAgent().then((userAgent) =\u003e {\n  // iOS: \"Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143\"\n  // tvOS: not available\n  // Android: \"Mozilla/5.0 (Linux; Android 12; sdk_gphone64_arm64 Build/SE1A.220630.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.114 Mobile Safari/537.36\"\n  // Windows: ?\n});\n```\n\n---\n\n### getVersion()\n\nGets the application version.\nTake into account that a version string is device/OS formatted and can contain any additional data (such as build number etc.). If you want to be sure about version format, you can use a regular expression to get the desired portion of the returned version string.\n\n#### Examples\n\n```js\nlet version = DeviceInfo.getVersion();\n// iOS: \"1.0\"\n// Android: \"1.0\" or \"1.0.2-alpha.12\"\n// Windows: ?\n```\n\n---\n\n### isAirplaneMode()\n\nTells if the device is in Airplane Mode.\n\n#### Examples\n\n```js\nDeviceInfo.isAirplaneMode().then((airplaneModeOn) =\u003e {\n  // false\n});\n```\n\n#### Notes\n\n\u003e - This only works if the remote debugger is disabled.\n\n---\n\n### isBatteryCharging()\n\nTells if the battery is currently charging.\n\n#### Examples\n\n```js\nDeviceInfo.isBatteryCharging().then((isCharging) =\u003e {\n  // true or false\n});\n```\n\n---\n\n### isEmulator()\n\nTells if the application is running in an emulator.\n\n#### Examples\n\n```js\nDeviceInfo.isEmulator().then((isEmulator) =\u003e {\n  // false\n});\n```\n\n---\n\n### isKeyboardConnected()\n\nTells if the device has a keyboard connected.\n\n#### Examples\n\n```js\nlet isKeyboardConnected = DeviceInfo.isKeyboardConnected();\n// true\n```\n\n---\n\n### isPinOrFingerprintSet()\n\nTells if a PIN number or a fingerprint was set for the device.\n\n#### Examples\n\n```js\nDeviceInfo.isPinOrFingerprintSet().then((isPinOrFingerprintSet) =\u003e {\n  if (!isPinOrFingerprintSet) {\n    // ...\n  }\n});\n```\n\n---\n\n### isTablet()\n\nTells if the device is a tablet.\n\n#### Examples\n\n```js\nlet isTablet = DeviceInfo.isTablet();\n// true\n```\n\n---\n\n### isLowRamDevice()\n\nTells if the device has low RAM.\n\n#### Examples\n\n```js\nlet isLowRamDevice = DeviceInfo.isLowRamDevice();\n// true\n```\n\n---\n\n### isDisplayZoomed()\n\nTells if the user changed Display Zoom to Zoomed\n\n#### Examples\n\n```js\nlet isDisplayZoomed = DeviceInfo.isDisplayZoomed();\n// true\n```\n\n---\n\n### isTabletMode()\n\nTells if the device is in tablet mode.\n\n#### Examples\n\n```js\nlet isTabletMode = DeviceInfo.isTabletMode();\n// true\n```\n\n---\n\n### isLandscape()\n\nTells if the device is currently in landscape mode.\n\n#### Examples\n\n```js\nDeviceInfo.isLandscape().then((isLandscape) =\u003e {\n  // true\n});\n```\n\n---\n\n### isMouseConnected()\n\nTells if the device has a mouse connected.\n\n#### Examples\n\n```js\nlet isMouseConnected = DeviceInfo.isMouseConnected();\n// true\n```\n\n---\n\n### hasGms()\n\nTells if the device supports Google Mobile Services.\n\n#### Examples\n\n```js\nDeviceInfo.hasGms().then((hasGms) =\u003e {\n  // true\n});\n```\n\n---\n\n### hasHms()\n\nTells if the device supports Huawei Mobile Services.\n\n#### Examples\n\n```js\nDeviceInfo.hasHms().then((hasHms) =\u003e {\n  // true\n});\n```\n\n---\n\n### hasNotch()\n\nTells if the device has a notch.\n\n#### Examples\n\n```js\nlet hasNotch = DeviceInfo.hasNotch();\n// true\n```\n\n---\n\n### hasDynamicIsland()\n\nTells if the device has a dynamic island.\n\n#### Examples\n\n```js\nlet hasDynamicIsland = DeviceInfo.hasDynamicIsland();\n// true\n```\n\n---\n\n### getDeviceType()\n\nReturns the device's type as a string, which will be one of:\n\n- `Handset`\n- `Tablet`\n- `Tv`\n- `Desktop`\n- `GamingConsole`\n- `Headset`\n- `unknown`\n\n#### Examples\n\n```js\nlet type = DeviceInfo.getDeviceType();\n// 'Handset'\n```\n\n---\n\n### supported32BitAbis()\n\nAn ordered list of 32 bit ABIs supported by this device.\n\n#### Examples\n\n```js\nDeviceInfo.supported32BitAbis().then((abis) =\u003e {\n  // [\"armeabi-v7a\", \"armeabi\"]\n});\n```\n\n---\n\n### supported64BitAbis()\n\nAn ordered list of 64 bit ABIs supported by this device.\n\n#### Examples\n\n```js\nDeviceInfo.supported64BitAbis().then((abis) =\u003e {\n  // [\"arm64-v8a\"]\n});\n```\n\n---\n\n### supportedAbis()\n\nReturns a list of supported processor architecture version\n\n#### Examples\n\n```js\nDeviceInfo.supportedAbis().then((abis) =\u003e {\n  // [ \"arm64 v8\", \"Intel x86-64h Haswell\", \"arm64-v8a\", \"armeabi-v7a\", \"armeabi\", \"win_x86\", \"win_arm\", \"win_x64\", \"win_arm64\", \"win_x86onarm64\" ]});\n```\n\n---\n\n### hasSystemFeature(feature)\n\nTells if the device has a specific system feature.\n\n#### Examples\n\n```js\nDeviceInfo.hasSystemFeature('amazon.hardware.fire_tv').then((hasFeature) =\u003e {\n  // true or false\n});\n```\n\n---\n\n### getSystemAvailableFeatures()\n\nReturns a list of available system features on Android.\n\n#### Examples\n\n```js\nDeviceInfo.getSystemAvailableFeatures().then((features) =\u003e {\n  // [\"android.software.backup\", \"android.hardware.screen.landscape\", \"android.hardware.wifi\", ...]\n});\n```\n\n### isLocationEnabled()\n\nTells if the device has location services turned off at the device-level (NOT related to app-specific permissions)\n\n#### Examples\n\n```js\nDeviceInfo.isLocationEnabled().then((enabled) =\u003e {\n  // true or false\n});\n```\n\n### isHeadphonesConnected()\n\nTells if the device is connected to wired headset or bluetooth headphones\n\n#### Examples\n\n```js\nDeviceInfo.isHeadphonesConnected().then((enabled) =\u003e {\n  // true or false\n});\n```\n\n### isWiredHeadphonesConnected()\n\nTells if the device is connected to wired headset\n\n#### Examples\n\n```js\nDeviceInfo.isWiredHeadphonesConnected().then((enabled) =\u003e {\n  // true or false\n});\n```\n\n### isBluetoothHeadphonesConnected()\n\nTells if the device is connected to bluetooth headset\n\n#### Examples\n\n```js\nDeviceInfo.isBluetoothHeadphonesConnected().then((enabled) =\u003e {\n  // true or false\n});\n```\n\n### getAvailableLocationProviders()\n\nReturns an object of **platform-specfic** location providers/servcies, with `boolean` value whether or not they are currently available.\n\n\u003e NOTE: This function requires access to the Location permission on Android\n\n#### Android Example\n\n```js\nDeviceInfo.getAvailableLocationProviders().then((providers) =\u003e {\n  // {\n  //   gps: true\n  //   network: true\n  //   passive: true\n  // }\n});\n```\n\n#### iOS Example\n\n```js\nDeviceInfo.getAvailableLocationProviders().then((providers) =\u003e {\n  // {\n  //   headingAvailable: false\n  //   isRangingAvailable: false\n  //   locationServicesEnabled: true\n  //   significantLocationChangeMonitoringAvailable: true\n  // }\n});\n```\n\n### getBrightness()\n\nGets the current brightness level of the device's main screen. Currently iOS only. Returns a number between 0.0 and 1.0, inclusive.\n\n#### Examples\n\n```js\nDeviceInfo.getBrightness().then((brightness) =\u003e {\n  // iOS: 0.6\n});\n```\n\n## Hooks \u0026 Events\n\nSupported in Windows, iOS \u0026 Android (web support for battery/charging-related APIs).\n\n### useBatteryLevel or RNDeviceInfo_batteryLevelDidChange\n\nFired when the battery level changes; sent no more frequently than once per minute.\n\n#### Examples\n\n```js\nimport { useBatteryLevel } from 'react-native-device-info';\n\nconst batteryLevel = useBatteryLevel(); // 0.759999\n\n\u003cText\u003e{batteryLevel}\u003c/Text\u003e;\n```\n\n```js\nimport { NativeEventEmitter, NativeModules } from 'react-native';\nconst deviceInfoEmitter = new NativeEventEmitter(NativeModules.RNDeviceInfo);\n\ndeviceInfoEmitter.addListener('RNDeviceInfo_batteryLevelDidChange', (level) =\u003e {\n  // 0.759999\n});\n```\n\n---\n\n### useBatteryLevelIsLow or RNDeviceInfo_batteryLevelIsLow\n\nFired when the battery level is considered low (multiple times untill charged)\n\n| Platform | Percentage |\n| -------- | ---------- |\n| iOS      | 20         |\n| Android  | 15         |\n| Web      | 20         |\n| Windows  | 20         |\n\n#### Examples\n\n```js\nimport { useBatteryLevelIsLow } from 'react-native-device-info';\n\nconst batteryLevelIsLow = useBatteryLevelIsLow(); // 0.19\n\n\u003cText\u003e{batteryLevelIsLow}\u003c/Text\u003e;\n```\n\n```js\nimport { NativeEventEmitter, NativeModules } from 'react-native';\nconst deviceInfoEmitter = new NativeEventEmitter(NativeModules.RNDeviceInfo);\n\ndeviceInfoEmitter.addListener('RNDeviceInfo_batteryLevelIsLow', (level) =\u003e {\n  // 0.19\n});\n```\n\n---\n\n### usePowerState or RNDeviceInfo_powerStateDidChange\n\nFired when the battery state changes or device enters in the power saving mode, for example when the device enters charging mode or is unplugged.\n\n#### Examples\n\n```js\nimport { usePowerState } from 'react-native-device-info';\n\nconst powerState = usePowerState();\n  // {\n  //   batteryLevel: 0.759999,\n  //   batteryState: 'unplugged',\n  //   lowPowerMode: false,\n  // }\n\n\u003cText\u003e{powerState}\u003c/Text\u003e;\n```\n\n```js\nimport { NativeEventEmitter, NativeModules } from 'react-native'\nconst deviceInfoEmitter = new NativeEventEmitter(NativeModules.RNDeviceInfo)\n\ndeviceInfoEmitter.addListener('RNDeviceInfo_powerStateDidChange', { powerState } =\u003e {\n  // {\n  //   batteryLevel: 0.759999,\n  //   batteryState: 'unplugged',\n  //   lowPowerMode: false,\n  // }\n});\n```\n\n---\n\n### useFirstInstallTime\n\nGets the time at which the app was first installed, in milliseconds.\n\n#### Example\n\n```jsx\nimport { useFirstInstallTime } from 'react-native-device-info';\n\nconst { loading, result } = useFirstInstallTime(); // { loading: true, result: 1517681764528}\n\n\u003cText\u003e{loading ? 'loading...' : result}\u003c/Text\u003e;\n```\n\n---\n\n### useDeviceName\n\nGets the device name.\n\n#### Example\n\n```jsx\nimport { useDeviceName } from 'react-native-device-info';\n\nconst { loading, result } = useDeviceName(); // { loading: true, result: \"Becca's iPhone 6\"}\n\n\u003cText\u003e{loading ? 'loading...' : result}\u003c/Text\u003e;\n```\n\n---\n\n### useHasSystemFeature\n\nTells if the device has a specific system feature.\n\n#### Example\n\n```jsx\nimport { useHasSystemFeature } from 'react-native-device-info';\n\nconst { loading, result } = useHasSystemFeature('amazon.hardware.fire_tv'); // { loading: true, result: false }\n\n\u003cText\u003e{loading ? 'loading...' : result}\u003c/Text\u003e;\n```\n\n---\n\n### useIsEmulator\n\nGet whether the application is running in an emulator.\n\n#### Example\n\n```jsx\nimport { useIsEmulator } from 'react-native-device-info';\n\nconst { loading, result } = useIsEmulator(); // { loading: true, result: false }\n\n\u003cText\u003e{loading ? 'loading...' : result}\u003c/Text\u003e;\n```\n\n---\n\n### useManufacturer\n\nGets the device manufacturer.\n\n#### Example\n\n```jsx\nimport { useManufacturer } from 'react-native-device-info';\n\nconst { loading, result } = useManufacturer(); // { loading: true, result: \"Apple\"}\n\n\u003cText\u003e{loading ? 'loading...' : result}\u003c/Text\u003e;\n```\n\n---\n\n### useIsHeadphonesConnected\n\nTells if the device is connected to wired headset or bluetooth headphones.\n\nThis hook subscribes to the event, `RNDeviceInfo_headphoneConnectionDidChange` , and updates the `result` field accordingly.\n\n#### Example\n\n```jsx\nimport { useIsHeadphonesConnected } from 'react-native-device-info';\n\nconst { loading, result } = useIsHeadphonesConnected(); // { loading: true, result: false}\n\n\u003cText\u003e{loading ? 'loading...' : result}\u003c/Text\u003e;\n```\n\n---\n\n### useIsWiredHeadphonesConnected\n\nTells if the device is connected to wired headset.\n\nThis hook subscribes to the event, `RNDeviceInfo_headphoneWiredConnectionDidChange` , and updates the `result` field accordingly.\n\n#### Example\n\n```jsx\nimport { useIsWiredHeadphonesConnected } from 'react-native-device-info';\n\nconst { loading, result } = useIsWiredHeadphonesConnected(); // { loading: true, result: false}\n\n\u003cText\u003e{loading ? 'loading...' : result}\u003c/Text\u003e;\n```\n\n---\n\n### useIsBluetoothHeadphonesConnected\n\nTells if the device is connected to bluetooth headphones.\n\nThis hook subscribes to the event, `RNDeviceInfo_headphoneBluetoothConnectionDidChange` , and updates the `result` field accordingly.\n\n#### Example\n\n```jsx\nimport { useIsBluetoothHeadphonesConnected } from 'react-native-device-info';\n\nconst { loading, result } = useIsBluetoothHeadphonesConnected(); // { loading: true, result: false}\n\n\u003cText\u003e{loading ? 'loading...' : result}\u003c/Text\u003e;\n```\n\n---\n\n### useBrightness\n\nGets the current brightness level of the device's main screen. Currently iOS only. Returns a number between 0.0 and 1.0, inclusive.\n\nThis hook subscribes to the event, `RNDeviceInfo_brightnessDidChange` , and updates the `brightness` field accordingly.\n\n#### Example\n\n```jsx\nimport { useBrightness } from 'react-native-device-info';\n\nconst brightness = useBrightness(); // 0.46578987897654567\n\n\u003cText\u003e{brightness}\u003c/Text\u003e;\n```\n\n```js\nimport { NativeEventEmitter, NativeModules } from 'react-native';\n\nconst deviceInfoEmitter = new NativeEventEmitter(NativeModules.RNDeviceInfo);\n\ndeviceInfoEmitter.addListener('RNDeviceInfo_brightnessDidChange', (brightness) =\u003e {\n  // 0.46578987897654567\n});\n```\n\n=======\n\n## Native interoperatibily\n\nIf you need to check for device type from the native side, you can use the following:\n\n```java\nimport com.learnium.resolver.DeviceTypeResolver\n\n...\ndeviceTypeResolver = new DeviceTypeResolver(context);\n...\n//Check if the device is a Tablet:\nif(deviceTypeResolver.isTablet){\n  ...\n}else{\n  ...\n}\n```\n\n## Troubleshooting\n\nWhen installing or using `react-native-device-info`, you may encounter the following problems:\n\n\u003cdetails\u003e\n  \u003csummary\u003e[android] - Unable to merge dex / Multiple dex files / Problems with `com.google.android.gms`\u003c/summary\u003e\n\n`react-native-device-info` uses `com.google.android.gms:play-services-gcm` to provide [getInstanceId()](#getinstanceid).\nThis can lead to conflicts when building the Android application.\n\nIf you're using a different version of `com.google.android.gms:play-services-gcm` in your app, you can define the\n`googlePlayServicesVersion` gradle variable in your `build.gradle` file to tell `react-native-device-info` what version\nit should require. See the example project included here for a sample.\n\nIf you're using a different library that conflicts with `com.google.android.gms:play-services-gcm`, and you are certain you know what you are doing such that you will avoid version conflicts, you can simply\nignore this dependency in your gradle file:\n\n```groovy\n compile(project(':react-native-device-info')) {\n    exclude group: 'com.google.android.gms'\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e[ios] - ld: library not found for -lRNDeviceInfo-tvOS\u003c/summary\u003e\n\nSeems to be a bug caused by `react-native link`. You can manually delete `libRNDeviceInfo-tvOS.a` in `Xcode -\u003e [Your iOS build target] -\u003e Build Phrases -\u003e Link Binary with Libraries`.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e[ios] - [NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099\n “The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.”\u003c/summary\u003e\n\nThis is a system level log that may be turned off by executing:\n`xcrun simctl spawn booted log config --mode \"level:off\" --subsystem com.apple.CoreTelephony`.\nTo undo the command, you can execute:\n`xcrun simctl spawn booted log config --mode \"level:info\" --subsystem com.apple.CoreTelephony`\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e[ios] - Multiple versions of React when using CocoaPods\n  \"tries to require 'react-native' but there are several files providing this module\"\u003c/summary\u003e\n\n### RN\u003c=59 You may need to adjust your Podfile like this if you use Cocoapods and have undefined symbols or duplicate React definitions\n\n```ruby\ntarget 'yourTargetName' do\n  # See http://facebook.github.io/react-native/docs/integration-with-existing-apps.html#configuring-cocoapods-dependencies\n  pod 'React', :path =\u003e '../node_modules/react-native', :subspecs =\u003e [\n    'Core',\n    'CxxBridge', # Include this for RN \u003e= 0.47\n    'DevSupport', # Include this to enable In-App Devmenu if RN \u003e= 0.43\n    'RCTText',\n    'RCTNetwork',\n    'RCTWebSocket', # Needed for debugging\n    'RCTAnimation', # Needed for FlatList and animations running on native UI thread\n    # Add any other subspecs you want to use in your project\n  ]\n\n  # Explicitly include Yoga if you are using RN \u003e= 0.42.0\n  pod 'yoga', :path =\u003e '../node_modules/react-native/ReactCommon/yoga'\n\n  # Third party deps podspec link - you may have multiple pods here, just an example\n  pod 'RNDeviceInfo', path: '../node_modules/react-native-device-info'\n\nend\n\n# if you see errors about React duplicate definitions, this fixes it. The same works for yoga.\npost_install do |installer|\n  installer.pods_project.targets.each do |target|\n    if target.name == \"React\"\n      target.remove_from_project\n    end\n  end\nend\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e[tests] - Cannot run my test suite when using this library\u003c/summary\u003e\n\n`react-native-device-info` contains native code, and needs to be mocked. Jest Snapshot support may work though.\n\nIf you do not have a Jest Setup file configured, you should add the following to your Jest settings and create the jest.setup.js file in project root:\n\n```js\nsetupFiles: ['\u003crootDir\u003e/jest.setup.js'];\n```\n\nYou should then add the following to your Jest setup file to mock the DeviceInfo Native Module:\n\n```js\nimport mockRNDeviceInfo from 'react-native-device-info/jest/react-native-device-info-mock';\n\njest.mock('react-native-device-info', () =\u003e mockRNDeviceInfo);\n```\n\nCheckout the example project for more information.\n\n\u003c/details\u003e\n\u003cdetails\u003e\n    \u003csummary\u003e[warnings] - I get too many warnings (battery state, etc)\u003c/summary\u003e\n\nSome of the APIs (like getBatteryState) will throw warnings in certain conditions like on tvOS or the iOS emulator. This won't be visible in production but even in development it may be irritating. It is useful to have the warnings because these devices return no state, and that can be surprising, leading to github support issues. The warnings is intended to educate you as a developer. If the warnings are troublesome you may try this in your code to suppress them:\n\n```javascript\nimport { LogBox } from 'react-native';\nLogBox.ignoreLogs(['Battery state']);\n```\n\n\u003c/details\u003e\n\n## Release Notes\n\nSee the [CHANGELOG.md](https://github.com/react-native-device-info/react-native-device-info/blob/master/CHANGELOG.md).\n\n## Contributing\n\nPlease see the [`contributing guide`](/CONTRIBUTING.md).\n\n## react-native-dom\n\nAs a courtesy to developers, this library was made compatible in v0.21.6 with [react-native-dom](https://github.com/vincentriemer/react-native-dom) and [react-native-web](https://github.com/necolas/react-native-web) by providing an empty polyfill in order to avoid breaking builds.\n\nOnly [getUserAgent()](#getuseragent) will return a correct value. All other API methods will return an \"empty\" value of its documented return type: `0` for numbers, `''` for strings, `false` for booleans.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-native-device-info%2Freact-native-device-info","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-native-device-info%2Freact-native-device-info","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-native-device-info%2Freact-native-device-info/lists"}