Quantcast
Viewing all articles
Browse latest Browse all 17066

Toggle bluetooth for ios device in react-native

Is there a way to toggle bluetooth connectivity for ios in react-native? What I want to achieve is- show nearby bluetooth devices in my app, and if bluetooth is switched off, then switch it on and scan for nearby bluetooth devices. I am using react-native-ble-plx library in my app for this, it is working fine in android, but doesn't seem to work in ios. I am using the below code in android for enabling it-

import { BleManager } from 'react-native-ble-plx';
this.manager = new BleManager();
this.manager.enable();

How can I achieve the above functionality in ios, if it's possible?


Viewing all articles
Browse latest Browse all 17066

Trending Articles