{"id":22434520,"url":"https://github.com/sieuhuflit/react-native-unlock-device","last_synced_at":"2025-08-01T14:31:01.429Z","repository":{"id":57341158,"uuid":"168644573","full_name":"sieuhuflit/react-native-unlock-device","owner":"sieuhuflit","description":"React native unlock screen and wakeup device for Android","archived":false,"fork":false,"pushed_at":"2020-08-13T16:46:20.000Z","size":15,"stargazers_count":13,"open_issues_count":3,"forks_count":9,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-08-09T15:20:44.420Z","etag":null,"topics":["react","react-native","unlock","unlock-screen","wakeup"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sieuhuflit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-01T04:57:12.000Z","updated_at":"2024-02-14T05:39:20.000Z","dependencies_parsed_at":"2022-09-12T23:42:07.446Z","dependency_job_id":null,"html_url":"https://github.com/sieuhuflit/react-native-unlock-device","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sieuhuflit%2Freact-native-unlock-device","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sieuhuflit%2Freact-native-unlock-device/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sieuhuflit%2Freact-native-unlock-device/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sieuhuflit%2Freact-native-unlock-device/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sieuhuflit","download_url":"https://codeload.github.com/sieuhuflit/react-native-unlock-device/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228383696,"owners_count":17911329,"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":["react","react-native","unlock","unlock-screen","wakeup"],"created_at":"2024-12-05T23:08:46.502Z","updated_at":"2024-12-05T23:08:47.684Z","avatar_url":"https://github.com/sieuhuflit.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-unlock-device\n\n## Getting started\n\n`$ npm install react-native-react-native-unlock-device --save`\n\n### Mostly automatic installation\n\n`$ react-native link react-native-react-native-unlock-device`\n\n### Manual installation\n\n#### Android\n\n1. Open up `android/app/src/main/java/[...]/MainActivity.java`\n\n- Add `import com.reactlibrary.RNUnlockDevicePackage;` to the imports at the top of the file\n- Add `new RNUnlockDevicePackage()` to the list returned by the `getPackages()` method\n\n2. Append the following lines to `android/settings.gradle`:\n\n```\ninclude ':react-native-react-native-unlock-device'\nproject(':react-native-react-native-unlock-device').projectDir = new File(rootProject.projectDir, \t'../node_modules/react-native-react-native-unlock-device/android')\n```\n\n3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:\n\n```\n\tcompile project(':react-native-react-native-unlock-device')\n```\n\nAdd this this `AndroidManifest.xml`\n\n```xml\n\u003cuses-permission android:name=\"android.permission.WAKE_LOCK\" /\u003e\n\u003cuses-permission android:name=\"android.permission.DISABLE_KEYGUARD\"/\u003e\n```\n\n## Usage\n\n```javascript\nimport RNUnlockDevice from 'react-native-unlock-device';\n\n// TODO: What to do with the module?\nRNUnlockDevice.unlock()\n  .then(() =\u003e console.log('Success'))\n  .catch(error =\u003e console.log('Error', error));\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsieuhuflit%2Freact-native-unlock-device","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsieuhuflit%2Freact-native-unlock-device","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsieuhuflit%2Freact-native-unlock-device/lists"}