Skip to content

ParsedLLC/react-native-ble-setup-library

Repository files navigation

@particle/react-native-ble-setup-library

React Native library for setting up BLE devices.

Usage

The best way to see how this library is used is to check out the react-native-ble-setup-example package.

Installation

npm install @particle/react-native-ble-setup-library --save

API

SetupContext

React Context containing the BLE setup process

Kind: global constant


ensureAndroidPermissions ⇒ Promise.<boolean>

Ensures that all OS permissions have been granted to the app. It will trigger a dialog asking to allow precise location (this is required for the BLE) if the user hasn't approve it before.

Kind: global constant
Returns: Promise.<boolean> - true if the permissions were granted


useBLESetup ⇒ SetupContextType

Hook for using the SetupContext

Kind: global constant
Returns: SetupContextType - Setup context


atob(input) ⇒ string

Decode base64 string into a string

Kind: global function
Returns: string - Decoded string

Param Type Description
input string Base64 encoded input

atoi(input) ⇒ number

Decode base64 string into a number

Kind: global function
Returns: number - Decoded number

Param Type Description
input string Base64 encoded input

NOTE: Unfortunately, docs have a nasty habit of falling out of date. When in doubt, check usage in tests

License

Copyright © 2022 Particle Industries, Inc. Released under the Apache 2.0 license. See LICENSE for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors