{"id":14974379,"url":"https://github.com/manuelkch/react-native-network-connection-class","last_synced_at":"2026-02-08T15:32:26.333Z","repository":{"id":57338662,"uuid":"81071105","full_name":"manuelkch/react-native-network-connection-class","owner":"manuelkch","description":"React Native Android Bridge to Facebook's Network Connection Class","archived":false,"fork":false,"pushed_at":"2017-02-06T19:12:44.000Z","size":5,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T14:44:00.950Z","etag":null,"topics":["android-library","react","react-native","react-native-app","reactjs"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manuelkch.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":"2017-02-06T09:36:58.000Z","updated_at":"2021-09-29T10:25:51.000Z","dependencies_parsed_at":"2022-09-10T15:11:25.171Z","dependency_job_id":null,"html_url":"https://github.com/manuelkch/react-native-network-connection-class","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/manuelkch/react-native-network-connection-class","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manuelkch%2Freact-native-network-connection-class","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manuelkch%2Freact-native-network-connection-class/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manuelkch%2Freact-native-network-connection-class/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manuelkch%2Freact-native-network-connection-class/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manuelkch","download_url":"https://codeload.github.com/manuelkch/react-native-network-connection-class/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manuelkch%2Freact-native-network-connection-class/sbom","scorecard":{"id":615898,"data":{"date":"2025-08-11","repo":{"name":"github.com/manuelkch/react-native-network-connection-class","commit":"bac223cda801247749c77fd219d60f4368273ab4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/2 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":"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":"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":"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":"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":"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":"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: The Unlicense: 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-21T03:56:19.687Z","repository_id":57338662,"created_at":"2025-08-21T03:56:19.687Z","updated_at":"2025-08-21T03:56:19.687Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29235249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T14:18:14.570Z","status":"ssl_error","status_checked_at":"2026-02-08T14:18:14.071Z","response_time":57,"last_error":"SSL_read: 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":["android-library","react","react-native","react-native-app","reactjs"],"created_at":"2024-09-24T13:50:28.948Z","updated_at":"2026-02-08T15:32:26.319Z","avatar_url":"https://github.com/manuelkch.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native Network Connection Class\nAndroid Bridge to Facebook's [Network Connection Class](https://github.com/facebook/network-connection-class)\n\n\u003eNetwork Connection Class is an Android library that allows you to figure out the quality of the current user's internet connection. The connection gets classified into several \"Connection Classes\"  that make it easy to develop against.\n\n[![NPM](https://nodei.co/npm/react-native-network-connection-class.png)](https://www.npmjs.com/package/react-native-network-connection-class)\n\n\n## Installation\n```bash\n1) npm i --save react-native-network-connection-class\n\nor manually:\nAdd repository to package.json\n\"react-native-device-year-class\": \"git+ssh://git@github.com:manuelkch/react-native-network-connection-class.git\"\n\n2) Run\nnpm install\n\nor manually:\ngit clone the directory to [node_modules/react-native-network-connection-class]\n```\n\n### Add it to your react-native project\n#### React Native Link\n`react-native link react-native-network-connection-class`\n#### or manually\n\n* In `android/setting.gradle`\n\t```gradle\n\t...\n  include ':react-native-network-connection-class'\n  project(':react-native-network-connection-class').projectDir = new File(settingsDir, '../node_modules/react-native-network-connection-class/android')\n\n\t```\n* In `android/app/build.gradle`\n\n\t```gradle\n\t...\n\tdependencies {\n\t    ...\n      compile project(':react-native-network-connection-class')\n\t}\n\n  ```\n\n* register module in `MainApplication.java`\n\n  ```java\n    import com.ymc.NetworkConnectionClass.Package;  \n    ...\n\n    protected List\u003cReactPackage\u003e getPackages() {\n        return Arrays.\u003cReactPackage\u003easList(\n                new MainReactPackage(),\n                new Package() // \u003c-- Add this line.\n        );\n    }\n\t```\n\n## Example\n\n```javascript\n...\nimport NetworkConnectionClass from 'react-native-network-connection-class'  \n\t...\n\t//listen to connection class changes\n\tDeviceEventEmitter.addListener('connectionClassChange', function(e: Event) {\n\t\t// new state\n    console.warn(e.state)\n  })\n\t...\n\t//get current class string (POOR, MODERATE,GOOD or EXCELENT)\n\tNetworkConnectionClass.getCurrentQuality().then((status) =\u003e {\n\t\t//current state\n\t\tconsole.warn(status)\n\t})\n\t...\n\t//start/stop sampling bandwith data on newtork activities\n\tNetworkConnectionClass.startSampling()\n\t.fetch('https://jsonplaceholder.typicode.com/photos')\n\t\t.then(function(response) {\n\t\t\tNetworkConnectionClass.stopSampling()\n\t\t\t...\n\t})\n\t...\n\t// get boolean if sampling thread is running\n\tNetworkConnectionClass.getSamplingState().then((isSampling) =\u003e {\n\t\tconsole.warn(isSampling)\n\t})\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanuelkch%2Freact-native-network-connection-class","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanuelkch%2Freact-native-network-connection-class","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanuelkch%2Freact-native-network-connection-class/lists"}