I'm building an app in CN1 that communicates with a BLE device (BlueGiga BLE module). In android 5.0 an CN1 app works as it should. In Android 6 the same app can't find any BLE devices. I can however connect manually to a specific BLE device (device address preset). So the scanning in Android 6 doesn't work. Based on this I figured out that I need to turn on GPS location and in the source add:
LocationManager locationManager = LocationManager.getLocationManager();
Is this a bug in CN1 or is it a problem in android? The default scanner in Android 6 (under Settings -> Bluetooth) and the app BlueGiga don't need to turn on GPS location (BlueGiga is written in Android). I also found the app BLE Scanner that does need to turn GPS location. Is it written in CN1?
Why is it necessary to turn on GPS location for BLE scanning to work on devices with Android 6?