{"id":4622,"url":"https://github.com/remobile/react-native-battery-status","last_synced_at":"2026-03-10T16:31:02.756Z","repository":{"id":57335693,"uuid":"46019954","full_name":"remobile/react-native-battery-status","owner":"remobile","description":null,"archived":false,"fork":false,"pushed_at":"2018-05-09T08:41:49.000Z","size":14,"stargazers_count":15,"open_issues_count":3,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-24T09:43:58.645Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","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/remobile.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":"2015-11-12T00:54:57.000Z","updated_at":"2023-07-21T11:15:34.000Z","dependencies_parsed_at":"2022-09-07T16:40:35.163Z","dependency_job_id":null,"html_url":"https://github.com/remobile/react-native-battery-status","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/remobile/react-native-battery-status","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remobile%2Freact-native-battery-status","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remobile%2Freact-native-battery-status/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remobile%2Freact-native-battery-status/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remobile%2Freact-native-battery-status/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remobile","download_url":"https://codeload.github.com/remobile/react-native-battery-status/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remobile%2Freact-native-battery-status/sbom","scorecard":{"id":770342,"data":{"date":"2025-08-11","repo":{"name":"github.com/remobile/react-native-battery-status","commit":"06783dfd07f69c95ea70e16b2429ff46847ffdd9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Code-Review","score":0,"reason":"Found 0/7 approved changesets -- score normalized to 0","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":-1,"reason":"No tokens found","details":null,"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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"}}]},"last_synced_at":"2025-08-23T02:04:15.552Z","repository_id":57335693,"created_at":"2025-08-23T02:04:15.552Z","updated_at":"2025-08-23T02:04:15.552Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30342175,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T15:55:29.454Z","status":"ssl_error","status_checked_at":"2026-03-10T15:54:58.440Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-01-05T20:17:18.221Z","updated_at":"2026-03-10T16:31:02.732Z","avatar_url":"https://github.com/remobile.png","language":"Objective-C","funding_links":[],"categories":["Components"],"sub_categories":["System"],"readme":"# React Native BatteryStatus (remobile)\nA cordova battery status listener for react-native, support for ios and android\n\n## Installation\n```sh\nnpm install @remobile/react-native-battery-status --save\n```\n### Installation (iOS)\n* Drag RCTBatteryStatus.xcodeproj to your project on Xcode.\n* Click on your main project file (the one that represents the .xcodeproj) select Build Phases and drag libRCTBatteryStatus.a from the Products folder inside the RCTBatteryStatus.xcodeproj.\n* Look for Header Search Paths and make sure it contains both $(SRCROOT)/../../../react-native/React as recursive.\n\n### Installation (Android)\n```gradle\n...\ninclude ':react-native-battery-status'\nproject(':react-native-battery-status').projectDir = new File(settingsDir, '../node_modules/@remobile/react-native-battery-status/android')\n```\n\n* In `android/app/build.gradle`\n\n```gradle\n...\ndependencies {\n    ...\n    compile project(':react-native-battery-status')\n}\n```\n\n* register module (in MainApplication.java)\n\n```java\n......\nimport com.remobile.batteryStatus.RCTBatteryStatusPackage;  // \u003c--- import\n\n......\n\n@Override\nprotected List\u003cReactPackage\u003e getPackages() {\n   ......\n   new RCTBatteryStatusPackage(),            // \u003c------ add here\n   ......\n}\n\n```\n\n## Usage\n\n### Example\n```js\nvar React = require('react');\nvar ReactNative = require('react-native');\nvar {\n    StyleSheet,\n    View,\n    Image\n} = ReactNative;\n\nvar BatteryStatus = require('@remobile/react-native-battery-status');\nvar Button = require('@remobile/react-native-simple-button');\n\nmodule.exports = React.createClass({\n    getInitialState () {\n        return {\n            status: '',\n        };\n    },\n    onBatteryStatus(info) {\n        this.setState({status: JSON.stringify({onBatteryStatus: info})});\n    },\n    onBatteryLow(info) {\n        this.setState({status: JSON.stringify({onBatteryLow: info})});\n    },\n    onBatteryCritical(info) {\n        this.setState({status: JSON.stringify({onBatteryCritical: info})});\n    },\n    register() {\n        BatteryStatus.register({\n            onBatteryStatus: this.onBatteryStatus,\n            onBatteryLow: this.onBatteryLow,\n            onBatteryCritical: this.onBatteryCritical,\n        });\n    },\n    unregister() {\n        BatteryStatus.unregister();\n    },\n    render() {\n        return (\n            \u003cView style={styles.container}\u003e\n                \u003cButton onPress={this.register}\u003e\n                    register\n                \u003c/Button\u003e\n                \u003cButton onPress={this.unregister}\u003e\n                    unregister\n                \u003c/Button\u003e\n                \u003cText\u003e\n                    {this.state.status}\n                \u003c/Text\u003e\n            \u003c/View\u003e\n        );\n    },\n});\n\n\nvar styles = StyleSheet.create({\n    container: {\n        flex: 1,\n        justifyContent: 'space-around',\n        alignItems: 'center',\n        backgroundColor: 'transparent',\n    },\n});\n```\n\n### HELP\n* look https://github.com/apache/cordova-plugin-battery-status\n\n\n### thanks\n* this project come from https://github.com/apache/cordova-plugin-battery-status\n\n### see detail use\n* https://github.com/remobile/react-native-template\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremobile%2Freact-native-battery-status","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremobile%2Freact-native-battery-status","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremobile%2Freact-native-battery-status/lists"}