UNPKG

react-native-ble-nitro

Version:

High-performance React Native BLE library built on Nitro Modules

36 lines (35 loc) 1.38 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 */ 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; /** * Android advertising permission message. Set to false to skip adding the permission. * @default "Allow $(PRODUCT_NAME) to advertise bluetooth devices" */ androidAdvertisingEnabled?: boolean; } export declare const withBleNitroAndroid: ConfigPlugin<BleNitroPluginProps>; export declare const withBleNitroIOS: ConfigPlugin<BleNitroPluginProps>; declare const withBleNitro: ConfigPlugin<BleNitroPluginProps>; export default withBleNitro;