Package 

Class BackgroundScannerImpl

    • Method Detail

      • scanBleDeviceInBackground

         void scanBleDeviceInBackground(@NonNull() PendingIntent callbackIntent, ScanSettings scanSettings, Array<ScanFilter> scanFilters)

        Submits a scan request that will work even if your process gets killed by the system. You can use this API to maintain abackground scan without a need to keep your application foreground and active. The system will manage the scan for you andwill wake your process up once a result is available.

        When the PendingIntent is delivered, the Intent passed to the receiver or activitywill contain one or more of the extras EXTRA_CALLBACK_TYPE, EXTRA_ERROR_CODE and EXTRA_LIST_SCAN_RESULT to indicate the result of the scan.

        Parameters:
        callbackIntent - Intent that will be executed when the scan result becomes available
        scanSettings - Scan settings
        scanFilters - Filtering settings