I'm new in the world of the Ionic framework and I'm developing an Ionic app using bluetooth-low-energy (the cordova plugin ble-central). Everything has worked well until two days ago. Now, the scan() function doesn't work anymore. The function is correctly called and the bluetooth and location permission are allowed. I've made no changes on my code that would explain this issue. I've also tried to uninstall/install the app, reboot my android phone and also used another phone. Nothing work.
Below a snips of my manifest:
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-feature android:name="android.hardware.location.gps" />
and the bluetooth code:
this.ble.scan([], 5).subscribe(
device =>
this.onDeviceDiscovered(device),// Never reached
error => {
this.scanError(error).catch(e => console.log('scan error ' + e)); // Never reached
},
() => console.log('completed')); // Never reached
// Debug
setTimeout(this.setStatus.bind(this), 6000, 'Scan completed');
The function setStatus is for debugging.
I've read and tried a lot of things but nothing work. Thanks for your help!
PS: Of course, the bluetooth and the gps are active when I'm using my app.