{"id":16230704,"url":"https://github.com/baygeldin/react-native-device-kit","last_synced_at":"2025-06-18T14:37:04.265Z","repository":{"id":57336520,"uuid":"136805088","full_name":"baygeldin/react-native-device-kit","owner":"baygeldin","description":"A React Native wrapper for MedM DeviceKit SDK.","archived":false,"fork":false,"pushed_at":"2018-07-17T09:36:25.000Z","size":305,"stargazers_count":6,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-06T00:36:19.662Z","etag":null,"topics":["medicine","medm","mobile-health","react-native"],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/baygeldin.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":"2018-06-10T12:01:29.000Z","updated_at":"2023-12-24T04:28:24.000Z","dependencies_parsed_at":"2022-09-03T08:01:30.622Z","dependency_job_id":null,"html_url":"https://github.com/baygeldin/react-native-device-kit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/baygeldin/react-native-device-kit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baygeldin%2Freact-native-device-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baygeldin%2Freact-native-device-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baygeldin%2Freact-native-device-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baygeldin%2Freact-native-device-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baygeldin","download_url":"https://codeload.github.com/baygeldin/react-native-device-kit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baygeldin%2Freact-native-device-kit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260571703,"owners_count":23029931,"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":["medicine","medm","mobile-health","react-native"],"created_at":"2024-10-10T13:01:12.158Z","updated_at":"2025-06-18T14:36:59.231Z","avatar_url":"https://github.com/baygeldin.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-device-kit\n\nA React Native wrapper for [MedM DeviceKit SDK](https://www.medm.com/sdk/). It allows to seamlessly connect to a great deal of medical sensors via Bluetooth and get such data as heart rate, blood pressure, temperature, spirometry, etc. And with React Native it's even better! Just think about it: one codebase that works on both major platforms (iOS and Android) and supports lots of medical devices right out of the box! Note that this is just a wrapper, so in order to use it you still have to purchase the original library.\n\n## Getting started\n\n```\n$ npm install react-native-device-kit --save\n```\n\n### Injecting the MedM DeviceKit\n\nIn order for `react-native-device-kit` to work you have to provide the original MedM DeviceKit library:\n\n```\n$ npx inject-device-kit --android /path/to/MedMDeviceKit.aar --ios /path/to/MedMDeviceKit.framework\n```\n\nYou could as well add it to your `package.json` scripts:\n\n```\n\"postinstall\": \"inject-device-kit --android /path/to/MedMDeviceKit.aar --ios /path/to/MedMDeviceKit.framework\"\n```\n\nAlso, don't forget to embed MedM DeviceKit binaries into your application. In order to do that add `MedMDeviceKit.framework` to your project in Xcode, then in \"General\" tab of your target add it to \"Embedded Binaries\" section.\n\n### Mostly automatic installation\n\n```\n$ react-native link\n```\n\nAlternatively:\n\n```\n$ react-native link react-native-device-kit\n$ react-native link react-native-swift\n```\n\nYes, `react-native-swift` peer dependency is required unless you already use Swift in your project.\n\n### Manual installation\n\n#### iOS\n\n1.  In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2.  Go to `node_modules` ➜ `react-native-device-kit` and add `RNDeviceKit.xcodeproj`\n3.  In XCode, in the project navigator, select your project. Add `libRNDeviceKit.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4.  Add `$(PROJECT_DIR)/../node_modules/react-native-device-kit/ios/Frameworks` to `FRAMEWORK_SEARCH_PATHS`.\n5.  Run your project (`Cmd+R`)\u003c\n\n#### Android\n\n1.  Open up `android/app/src/main/java/[...]/MainActivity.java`\n\n- Add `import com.reactnative.devicekit.RNDeviceKitPackage;` to the imports at the top of the file\n- Add `new RNDeviceKitPackage()` to the list returned by the `getPackages()` method\n\n2.  Append the following lines to `android/settings.gradle`:\n    ```\n    include ':react-native-device-kit'\n    project(':react-native-device-kit').projectDir = new File(rootProject.projectDir, \t'../node_modules/react-native-device-kit/android')\n    ```\n3.  Insert the following lines inside the dependencies block in `android/app/build.gradle`:\n    ```\n      compile project(':react-native-device-kit')\n    ```\n4.  Add the following repository to your app level `build.gradle`:\n    ```gradle\n    repositories{\n        flatDir{\n            dirs \"$rootDir/../node_modules/react-native-device-kit/android/libs\"\n        }\n    }\n    ```\n\n## Usage\n\n```javascript\nimport DeviceKit from 'react-native-device-kit';\n\nconst sdk = new DeviceKit()\n\nsdk.register(process.env.MEDM_DEVICEKIT_LICENSE_KEY)\n  .then(() =\u003e {\n    // You're good to go.\n  })\n  .catch(() =\u003e {\n    // Don't forget to provide a licence key!\n  });\n```\n\nCheck out the full API in [docs](docs).\n\n## Notes\n\n- There are no tests (_sigh_). MedM DeviceKit SDK itself is well tested, but writing tests for a wrapper is just too much pain: it needs a test react native app, SDK mock and also RNDeviceKit native module mock to test JavaScript side. Another solution is to use AWS Device Farm, but it's not free.\n- If you're planning to use stream measurements (as opposed to scalar measurements like blood glucose) then you'll probably need your app to work in background. For Android you would have to create a [foreground service](https://developer.android.com/guide/components/services#Foreground). On iOS [it's easier](https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html): just add `bluetooth-central` mode to your `Info.plist`.\n- Currently MedM DeviceKit returns measurements only as XML (documented [here](https://health.medm.com/docs/api/v3/index.html)), so you'll need to use something like [xmldom](https://github.com/jindw/xmldom).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaygeldin%2Freact-native-device-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaygeldin%2Freact-native-device-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaygeldin%2Freact-native-device-kit/lists"}