0.0.15 • Published 3 years ago

kindredsdk v0.0.15

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

kindredsdk

About this library:

This is a React Native Bluetooth Low Energy library wrapping react-native-ble-plx.

It supports:

  • scanning for nearby BLE devices
  • connecting to a BLE device
    • connecting to device
    • discovering services and characteristics
    • validating the discovered service and characteristics
    • registering notification and disconnect listeners
  • disconnecting from a connected BLE device
  • reading kindred device status
  • writing kindred device timestamp
  • reading record status and index
  • reading record data
  • writing record index
  • acknowledging successful read and incrementing record index
  • checking if a device is connected
  • background mode in iOS
  • background mode on Android

Configuration and installation:

iOS:

  1. Open project root folder
  2. npm install --save kindredsdk
  3. npm install --save react-native-ble-plx
  4. npm install —save react-native-background-actions
  5. Enter ios folder and run pod update
  6. From within the ios folder, enter the ‘YourAppName’ folder and open the ‘Info.plist’ file
  7. Add a new row with the key ’NSBluetoothAlwaysUsageDescription’ with the value ‘App uses BLE’
  8. To support background mode, open the application in Xcode and in the application target go to the ‘Signing & Capabilities’ tab, click ‘+ Capability’, click ‘Background modes’ and enable ‘Uses Bluetooth LE accessories’ and ‘Background processing’.

Android:

  1. Ensure completion of iOS steps 1, 2, 3 and 4.
  2. Open the application in Android Studio and open the ‘AndroidManifest.xml’ file.
  3. Add the following between the manifest tags:\ <uses-permission android:name="android.permission.INTERNET"/>\ <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>\ <uses-permission android:name="android.permission.WAKE_LOCK"/>\ <uses-permission android:name="android.permission.BLUETOOTH"/>
  4. Add the following between the application tags:\ <service android:name="com.asterinet.react.bgactions.RNBackgroundActionsTask"/>
0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago