Samsung Galaxy S9 couldn't find BLE device

I’ve implemented a GATT-server in my application using this library: GitHub - NordicSemiconductor/Android-BLE-Library: A library that makes working with Bluetooth LE on Android a pleasure. Seriously.
I asks for permissions and added all necessary uses-permission tags in AndroidManifest file. When I start the application, the GATT-server starts and works perfectly. I have downloaded Nrf Connect on multiple devices and scanned for the application on Android and iOS devices. Everything works fine on Xiaomi Mi 9T, Samsung Galaxy S10 and many different Huawei devices. Nrf Connect finds my GATT-server device and able to connect to. However, when I start Nrf connect on Samsung Galaxy S9 or Note 9 devices, my device doesn’t appear in the scan result list (however, it works perfectly on S10). I used the following code to build AdvertiseSettings and AdvertiseData objects:

fun settings(): AdvertiseSettings {
        return AdvertiseSettings.Builder()
            .setAdvertiseMode(AdvertiseSettings.ADVERTISE_MODE_LOW_LATENCY)
            .setConnectable(true)
            .setTimeout(0)
            .setTxPowerLevel(AdvertiseSettings.ADVERTISE_TX_POWER_HIGH)
            .build()
    }

    fun advertiseData(serviceUUIDs: List<UUID>): AdvertiseData {
        val builder = AdvertiseData.Builder()
            .setIncludeDeviceName(true)
            .setIncludeTxPowerLevel(false)

        for (serviceUUID in serviceUUIDs)
            builder.addServiceUuid(ParcelUuid(serviceUUID))

        return builder.build()
    }

The strange thing is that everything works fine (scanning, connecting, sending or receiving data) on all devices except on S9 series phones. Is there any platform specific thing or bug I missed?

There are several threads on the forum about BLE and Galaxy 8 and 9, I would suggest you search them to see if any are the same issues you have. I think this was a problem with the Galaxy devices that was fixed in later devices as I don’t see anything for the past year.

Be sure to search in the community Search not the upper Developer Portal search.

If you can’t find anything you can create a support request they may have something of help there.

Ron
Samsung Developer Relations