{"_id":"@dominicvonk/react-native-apk-installer","_rev":"1-0f4ee2403977761ea0d5950f1b1555c0","name":"@dominicvonk/react-native-apk-installer","dist-tags":{"latest":"2.2.2"},"versions":{"2.2.2":{"name":"@dominicvonk/react-native-apk-installer","version":"2.2.2","description":"A react-native library to install APK on Android","main":"index.js","typings":"index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["react-native","react-native-app-install"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/dominicvonk/react-native-apk-installer.git"},"peerDependencies":{"react":"*","react-native":">=0.60.0-rc.0 <1.0.x"},"gitHead":"dc4fad842a28d7e9abb9d9886225b5e167bb0288","bugs":{"url":"https://github.com/dominicvonk/react-native-apk-installer/issues"},"homepage":"https://github.com/dominicvonk/react-native-apk-installer#readme","_id":"@dominicvonk/react-native-apk-installer@2.2.2","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-1JIqdVaER7P7tL//z2fEvbATcNPFgMzM88MncDZB6cr9CQl9RegbIwYiInlTDNkv+3lmAOvJ+LnCsvsYWyoX7w==","shasum":"6049b3d99e337d28f5e7a42c1a20dabe2da12aac","tarball":"https://registry.npmjs.org/@dominicvonk/react-native-apk-installer/-/react-native-apk-installer-2.2.2.tgz","fileCount":12,"unpackedSize":12013,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8mwwCRA9TVsSAnZWagAAjUsQAKUCh4v59odtlqf4BRft\n0KEegwG6wiOFwh5kMOitkhBHA7sZODE0ZmEZI24rjVomedzegg6moIVe0K+h\nN6ksNie/U3oXxoweAQTOUWaFutvKLz3q0ezMXdkKZN/DnNVaf7Q+0XQag3wI\ncMknvi7PwIT9lgJHXIuGSh2M888UB1J9Dlqda6nXAgYPTimLIRWmV7dmD0PK\no+qWxcKwUdFWPAapG16U968jpXGWImKoUNAA7EhmkzoHi85oRpq2bSW5V+6M\n00hYvhm5Ysi1wkC15DzI3kpjA5y0xp9z03bOnC+SIMPssYgsZKWSPlVSJLKC\n0Gc0kmVOyuOjmQmy1nBX7rfnFA+5eXrHryFGDBd7xgcSoQ5CIZgOgE+DkFVv\nqNFDW2jdrBkCGKdRn16uNP14fjD7Yebdl3RZVp+Bn0v0UjIDII/DDPJGoCJ0\n5fnOYI5zWBcHPEWut0TKO5E9RJe77gSQpPdslnQQtkg15tLl09wwW5hsuPk3\n/t9UyqRelyuROwqybGdQX51TphhXvWO25pJJo9bdqvqsI7kn7JsDIrLZ8dHj\nOoXMQV+9HG3JA7odGlenKAr9scD+GQhg/OrQvjUn++fiA1Ib0RqdsEAsWtkk\n7+NnFAdGe/ARUyzM6ay9aD+0mDbts1DrfLPL+S8AwQqPR3RBW8S5P7+igO30\nk5RL\r\n=pwXu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID2WRXfjquedEIkswdxFPisHHQb189G+TfCXZDfNEcH9AiEAhrgZl4raWBpiFQvpLSohCdQKgwd4gfuRyJW/P3Gl6TA="}]},"_npmUser":{"name":"dominicvonk","email":"dominic@dominicvonk.com"},"directories":{},"maintainers":[{"name":"dominicvonk","email":"dominic@dominicvonk.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-apk-installer_2.2.2_1643277360496_0.5153710305844355"},"_hasShrinkwrap":false}},"time":{"created":"2022-01-27T09:56:00.435Z","2.2.2":"2022-01-27T09:56:00.646Z","modified":"2022-04-05T05:14:07.445Z"},"maintainers":[{"name":"dominicvonk","email":"dominic@dominicvonk.com"}],"description":"A react-native library to install APK on Android","homepage":"https://github.com/dominicvonk/react-native-apk-installer#readme","keywords":["react-native","react-native-app-install"],"repository":{"type":"git","url":"git+https://github.com/dominicvonk/react-native-apk-installer.git"},"bugs":{"url":"https://github.com/dominicvonk/react-native-apk-installer/issues"},"license":"MIT","readme":"# react-native-apk-installer\n\nSupport AndroidX and Android other version\n\n## Getting started\n\nAndroidX `$ yarn add @dominicvonk/react-native-apk-installer`\n\n### Mostly automatic install with react-native link (RN < 0.60)\n\n`$ react-native link @dominicvonk/react-native-apk-installer`\n\n## Usage\n\nYou can use react-native-fs to download the apk file:\n\n```javascript\nimport RNFS from \"react-native-fs\";\nimport RNApkInstaller from \"@dominicvonk/react-native-apk-installer\";\n\nconst filePath = RNFS.DocumentDirectoryPath + \"/com.domain.example.apk\";\nconst download = RNFS.downloadFile({\n  fromUrl: \"apk file download url\",\n  toFile: filePath,\n  progress: (res) => {\n    console.log((res.bytesWritten / res.contentLength).toFixed(2));\n  },\n  progressDivider: 1,\n});\n\ndownload.promise.then((result) => {\n  if (result.statusCode == 200) {\n    RNApkInstaller.install(filePath);\n  }\n});\n\n// Do you have permission to install from unknown sources?\nRNApkInstaller.haveUnknownAppSourcesPermission();\n\n// Turn on Unknown Sources permission settings\nRNApkInstaller.showUnknownAppSourcesPermission();\n```\n","readmeFilename":"README.md"}