UNPKG

react-native-ble-nitro

Version:

High-performance React Native BLE library built on Nitro Modules - drop-in replacement for react-native-ble-plx

32 lines (31 loc) 1.25 kB
import { ConfigPlugin } from 'expo/config-plugins'; export interface BleNitroPluginProps { /** * Enable background BLE support on Android. * Adds required permissions and features to AndroidManifest.xml * @default false */ isBackgroundEnabled?: boolean; /** * Set to true only if you can strongly assert that your app never derives * physical location from Bluetooth scan results. The location permission * will still be required on older Android devices. * @default false * @warning This parameter is experimental and BLE might not work. Test before releasing. */ neverForLocation?: boolean; /** * iOS background modes for BLE operations * @default undefined */ modes?: ('peripheral' | 'central')[]; /** * iOS Bluetooth permission message. Set to false to skip adding the permission. * @default "Allow $(PRODUCT_NAME) to connect to bluetooth devices" */ bluetoothAlwaysPermission?: string | false; } export declare const withBleNitroAndroid: ConfigPlugin<BleNitroPluginProps>; export declare const withBleNitroIOS: ConfigPlugin<BleNitroPluginProps>; declare const withBleNitro: ConfigPlugin<BleNitroPluginProps>; export default withBleNitro;