{"id":16795135,"url":"https://github.com/mehcode/rn-device-activity","last_synced_at":"2025-04-11T00:02:32.138Z","repository":{"id":143906623,"uuid":"64535951","full_name":"mehcode/rn-device-activity","owner":"mehcode","description":"Device Activity Events for React Native (iOS and Android)","archived":false,"fork":false,"pushed_at":"2016-12-06T14:55:43.000Z","size":9,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T20:43:04.049Z","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/mehcode.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-30T09:06:34.000Z","updated_at":"2017-03-09T10:55:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"3bbff4cc-6909-4326-bd8e-9c792f4bcfb5","html_url":"https://github.com/mehcode/rn-device-activity","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehcode%2Frn-device-activity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehcode%2Frn-device-activity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehcode%2Frn-device-activity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehcode%2Frn-device-activity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mehcode","download_url":"https://codeload.github.com/mehcode/rn-device-activity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248147402,"owners_count":21055540,"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","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-10-13T09:15:30.444Z","updated_at":"2025-04-11T00:02:32.120Z","avatar_url":"https://github.com/mehcode.png","language":"Java","readme":"# React Native Device Activity\n\u003e Device Activity Events for React Native (iOS and Android)\n\n## Install\n\n```\nnpm i rn-device-activity --save\n```\n\n## Configure\n\n```\nreact-native link rn-device-activity\n```\n\n## Usage\n\n```js\nimport {DeviceEventEmitter} from \"react-native\";\n\nfunction handleResume() {\n  // called on resume of app\n}\n\nfunction handlePause() {\n  // called on pause of app\n}\n\nfunction handleDestroy() {\n  // called on destroy of app\n}\n\n// Resume / Pause\nDeviceEventEmitter.addListener(\"deviceResume\", handleResume);\nDeviceEventEmitter.addListener(\"devicePause\", handlePause);\n\n// Android ONLY\nDeviceEventEmitter.addListener(\"deviceDestroy\", handleDestroy);\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehcode%2Frn-device-activity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmehcode%2Frn-device-activity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehcode%2Frn-device-activity/lists"}