{"id":15019755,"url":"https://github.com/shubhamd99/react-native-background-timer-workmanager","last_synced_at":"2026-01-20T07:02:24.752Z","repository":{"id":57688562,"uuid":"484998611","full_name":"shubhamd99/react-native-background-timer-workmanager","owner":"shubhamd99","description":null,"archived":false,"fork":false,"pushed_at":"2022-04-24T14:30:09.000Z","size":185,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-19T01:27:40.401Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/shubhamd99.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-24T10:44:24.000Z","updated_at":"2022-04-26T12:26:42.000Z","dependencies_parsed_at":"2022-08-25T15:41:14.833Z","dependency_job_id":null,"html_url":"https://github.com/shubhamd99/react-native-background-timer-workmanager","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shubhamd99/react-native-background-timer-workmanager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shubhamd99%2Freact-native-background-timer-workmanager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shubhamd99%2Freact-native-background-timer-workmanager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shubhamd99%2Freact-native-background-timer-workmanager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shubhamd99%2Freact-native-background-timer-workmanager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shubhamd99","download_url":"https://codeload.github.com/shubhamd99/react-native-background-timer-workmanager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shubhamd99%2Freact-native-background-timer-workmanager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28597985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"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":[],"created_at":"2024-09-24T19:54:01.945Z","updated_at":"2026-01-20T07:02:24.732Z","avatar_url":"https://github.com/shubhamd99.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native Background Timer Workmanager [Android]\nEmit event periodically in both foreground and background.\n\n## Installation\n1. If you use Expo to create a project [you'll just need to](https://facebook.github.io/react-native/docs/getting-started#caveats) \"[eject](https://docs.expo.io/versions/latest/expokit/eject)\".\n\n    ```bash\n    expo eject\n    ```\n\n2. Install React Native Background Timer Work Manager package.\n\n    ```bash\n    yarn add react-native-background-timer-workmanager\n    # or using npm\n    npm install react-native-background-timer-workmanager --save\n    ```\n\n3. Link React Native Background Timer library. This step is not necessary when you use React Native \u003e= 0.60 (and your app is not ejected from Expo).\n\n    ```bash\n    react-native link react-native-background-timer-workmanager\n    ```\n\n4. Link the library manually if you get errors:\n\n\u003cdetails\u003e\n    \u003csummary\u003eAndroid manual linking\u003c/summary\u003e\n\n- `android/settings.gradle`\n\n    ```diff\n    + include ':react-native-background-timer-workmanager'\n    + project(':react-native-background-timer-workmanager').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-background-timer-workmanager/android')\n    ```\n\n- `android/app/build.gradle`\n\n    ```diff\n    dependencies {\n    +   implementation project(':react-native-background-timer-workmanager')\n    }\n    ```\n\n- `android/app/src/main/java/com/your-app/MainApplication.java`\n\n    ```diff\n    + import com.shubhamd99.timer.BackgroundTimerPackage;\n\n    @Override\n    protected List\u003cReactPackage\u003e getPackages() {\n      return Arrays.\u003cReactPackage\u003easList(\n    +   new BackgroundTimerPackage()\n      );\n    }\n    ```\n\u003c/details\u003e\n\n## Usage\n\n```js\nimport BackgroundTimer from 'react-native-background-timer-workmanager';\n```\n\n```js\nBackgroundTimer.start(3000, 'UNIQUE_TAG' () =\u003e { \n// code that will be called every 3 seconds \n});\n\nBackgroundTimer.stop('UNIQUE_TAG'); // To Stop Polling\n```\n\nExample:\n```js\nimport React, {useEffect} from 'react';\n\nconst App = () =\u003e {\n    useEffect(() =\u003e {\n        BackgroundTimer.start(10000, 'homeScreenPolling', () =\u003e {\n            console.log('polling..');\n        });\n        return () =\u003e BackgroundTimer.stop('homeScreenPolling');\n    }, []);\n};\n\nexport default App;\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshubhamd99%2Freact-native-background-timer-workmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshubhamd99%2Freact-native-background-timer-workmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshubhamd99%2Freact-native-background-timer-workmanager/lists"}