iHealth React Native SDK

iHealth React Native SDK

iHealth device sdk .iHealth React Native SDK

iHealth device sdk

Installation

Using npm

npm install --save @ihealth/ihealthlibrary-react-native

Using yarn

yarn add @ihealth/ihealthlibrary-react-native

Usage

Authentication

Download license file
  1. Sign up iHealth developer webside. Please sign up here
  2. Press "Add New App" button, fill in your information of your app. We will get email and active the license for your app.
  3. Download license file, as shown below. Download
Integrate license file

For iOS As shown below, Add your license file to your iOS project. �integrate ios

For Android As show below, Add your license file to your asserts �folder. �integrate android

Using license file
import { iHealthDeviceManagerModule } from '@ihealth/ihealthlibrary-react-native';

// your license file
const filename = 'license.pem';
iHealthDeviceManagerModule.sdkAuthWithLicense(filename);

Troubleshooting

For Android
  1. Check settings.gradle file in your android project and node_modules, make sure input the correct module path.
include ':ihealthlibrary-react-native'
project(':ihealthlibrary-react-native').projectDir = new File(rootProject.projectDir,'../node_modules/@ihealth/ihealthlibrary-react-native/android')
  1. Check build.gradle file in your android project, make sure the ihealth module is �integrated
compile project(':@ihealth_ihealthlibrary-react-native')
  1. Import iHealth module in your MainActivity.java
protected List<ReactPackage> getPackages() {  
    return Arrays.<ReactPackage>asList(
        new MainReactPackage(),
        new iHealthDeviceManagerPackage()
    );  
}
  1. Location permission(in AndroidManifest.xml)
<!-- Need ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission in Android API 23+ -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
For iOS
  1. Open your iOS project, add node_modules/@ihealth/ihealthlibrary-react-native/ios/ReactNativeIOSLibrary.xcodeproj to libraries
  2. Under 'Build Phases' -- 'Link Binary With Libraries', add libReactNativeIOSLibrary.a

Example

iHealth SDK module is based on DeviceEventEmitter, So call add listener while the component is loaded, and call remove listener while the component is unloaded, As show as below. If you want more detail information, Please the example code.

componentDidMount() {
    iHealthAPI.addListener();
}

componentWillUnmount() {
    iHealthAPI.removeListener();
}
For bluetooth LE or regular bluetooth device
search device
import { iHealthDeviceManagerModule } from '@ihealth/ihealthlibrary-react-native';
const type = 'BP5'; // AM3S, AM4, BG5, BG5S, BP3L, BP5, BP5S, BP7S, HS2, HS4S, PO3,HS2S,BG1S
iHealthDeviceManagerModule.startDiscovery(type);
connect device
import { iHealthDeviceManagerModule } from '@ihealth/ihealthlibrary-react-native';
const mac = 'xxxxxxxxxxxxxx';
const type = 'BP5'; // AM3S, AM4, BG5, BG5S, BP3L, BP5, BP5S, BP7S, HS2, HS4S, PO3,HS2S,BG1S
iHealthDeviceManagerModule.connectDevice(mac, type);
device workflow

AM3S workflow AM4 workflow BG1 workflow BG5 workflow BG5S workflow BP3L workflow BP5 workflow BP5S workflow BP7S workflow HS2 workflow HS4S workflow HS6 workflow PO3 workflow HS2S workflow BG1S workflow

Download Details:

Author: iHealthDeviceLabs

Source Code: https://github.com/iHealthDeviceLabs/iHealth-React-Native-SDK

react-native react mobile-apps

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

How native is React Native? | React Native vs Native App Development

Article covers: How native is react native?, React Native vs (Ionic, Cordova), Similarities and difference between React Native and Native App Development.

React Native Mobile App Development

Skenix is providing React Native Development Services with qualified React Native App Developers. Get the best React Native App Development Services.

How React Native Is Shaping Mobile App Development

Are you a mobile app developer looking for more efficient tools for your projects? Mobile app development is getting tougher and tougher as the market continues to grow. As a developer, you need to develop Apps which meet the demands of your users. To achieve this, adopt the right tools, like the React Native development framework.

Top React Native Mobile App Development Companies in USA

Looking for top React Native mobile app development company in USA for Startups & Enterprise? Find out the top list of React Native mobile app development company in USA.

Which is the best React Native app development company in New York?

Hire top react native app development company in New York to build and develop custom react native mobile apps for Android & iOS with the latest features.