{"id":4158,"url":"https://github.com/marcshilling/react-native-idle-timer","last_synced_at":"2026-03-07T02:33:50.239Z","repository":{"id":1206219,"uuid":"41373005","full_name":"marcshilling/react-native-idle-timer","owner":"marcshilling","description":"A cross-platform bridge that allows you to enable and disable the screen idle timer in your React Native app","archived":false,"fork":false,"pushed_at":"2025-12-04T14:19:38.000Z","size":11622,"stargazers_count":220,"open_issues_count":7,"forks_count":44,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-07T22:30:42.817Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","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/marcshilling.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-08-25T15:54:27.000Z","updated_at":"2025-12-04T14:19:14.000Z","dependencies_parsed_at":"2024-06-18T18:16:22.927Z","dependency_job_id":"a08fe061-e40a-4c56-a839-c4d94439ea6e","html_url":"https://github.com/marcshilling/react-native-idle-timer","commit_stats":{"total_commits":49,"total_committers":18,"mean_commits":"2.7222222222222223","dds":0.653061224489796,"last_synced_commit":"3b9cc5d076d0025a39b78da6bb974532eb35d6bd"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/marcshilling/react-native-idle-timer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcshilling%2Freact-native-idle-timer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcshilling%2Freact-native-idle-timer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcshilling%2Freact-native-idle-timer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcshilling%2Freact-native-idle-timer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcshilling","download_url":"https://codeload.github.com/marcshilling/react-native-idle-timer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcshilling%2Freact-native-idle-timer/sbom","scorecard":{"id":618494,"data":{"date":"2025-08-11","repo":{"name":"github.com/marcshilling/react-native-idle-timer","commit":"7300b637c465c86e8db874c442e687950111da40"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Code-Review","score":5,"reason":"Found 14/26 approved changesets -- score normalized to 5","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":"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":"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":"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":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: 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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md: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 19 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"}}]},"last_synced_at":"2025-08-21T04:36:37.401Z","repository_id":1206219,"created_at":"2025-08-21T04:36:37.401Z","updated_at":"2025-08-21T04:36:37.401Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30206070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"online","status_checked_at":"2026-03-07T02:00:06.765Z","response_time":53,"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":[],"created_at":"2024-01-05T20:17:02.888Z","updated_at":"2026-03-07T02:33:50.220Z","avatar_url":"https://github.com/marcshilling.png","language":"Java","funding_links":[],"categories":["Components","Java","Others"],"sub_categories":["UI"],"readme":"# react-native-idle-timer\n\nA cross-platform bridge that allows you to enable and disable the screen idle timer in your React Native app\n\n## Install\n\n`yarn add react-native-idle-timer`\n\n## Link\n\n#### Automatically\n\n`react-native link react-native-idle-timer`\n\n#### Manually\n\n##### iOS\n1. In the XCode's \"Project navigator\", right click on your project's Libraries folder ➜ `Add Files to \u003c...\u003e`\n2. Go to `node_modules` ➜ `react-native-idle-timer` ➜ `ios` ➜ select `RNIdleTimer.xcodeproj`\n3. Add `libRNIdleTimer.a` to `Build Phases -\u003e Link Binary With Libraries`\n\n##### Android\n\n1. in `android/settings.gradle`\n\n```gradle\n...\ninclude ':react-native-idle-timer'\nproject(':react-native-idle-timer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-idle-timer/android')\n```\n\n2. in `android/app/build.gradle` add:\n\n```gradle\ndependencies {\n  ...\n  compile project(':react-native-idle-timer')\n}\n```\n\n3. and finally, in `android/src/main/java/com/{YOUR_APP_NAME}/MainActivity.java` add:\n\n```java\n//...\nimport com.marcshilling.idletimer.IdleTimerPackage; // \u003c--- This!\n\n//...\n@Override\nprotected List\u003cReactPackage\u003e getPackages() {\n  return Arrays.\u003cReactPackage\u003easList(\n    new MainReactPackage(),\n    new IdleTimerPackage() // \u003c---- and This!\n  );\n}\n```\n\n## Usage\n\n### In your React Native javascript code, bring in the native module:\n\n```javascript\nimport IdleTimerManager from 'react-native-idle-timer';\n```\n\u003cbr/\u003e\n\n### To disable the idle timer while a certain component is mounted:\n\nClass component\n```javascript\ncomponentWillMount() {\n  IdleTimerManager.setIdleTimerDisabled(true);\n}\n\ncomponentWillUnmount() {\n  IdleTimerManager.setIdleTimerDisabled(false);\n}\n```\n\n\nFunction component\n\n```javascript\nuseEffect(() =\u003e {\n  IdleTimerManager.setIdleTimerDisabled(true);\n\n  return () =\u003e IdleTimerManager.setIdleTimerDisabled(false);\n}, [])\n```\n\u003cbr/\u003e\n\n### If you have multiple components that are responsible for interacting with the idle timer, you can pass a tag as the second parameter:\n\n```javascript\nuseEffect(() =\u003e {\n  IdleTimerManager.setIdleTimerDisabled(true, \"video\");\n\n  return () =\u003e IdleTimerManager.setIdleTimerDisabled(false, \"video\");\n}, [])\n```\n\u003cbr/\u003e\n\n### If you need to interact from the native Android or iOS side:\n\nAndroid\n```java\nIdleTimerManager.activate(activity, \"video\");\nIdleTimerManager.deactivate(activity, \"video\");\n```\n\niOS\n```objectivec\n[IdleTimerManager activate:@\"video\"];\n[IdleTimerManager deactivate:@\"video\"];\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcshilling%2Freact-native-idle-timer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcshilling%2Freact-native-idle-timer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcshilling%2Freact-native-idle-timer/lists"}