Estimote / Android-Proximity-SDK

Estimote Proximity SDK for Android
https://developer.estimote.com
MIT License
82 stars 42 forks source link

Bluetooth Low Energy scan failed with error code: 2 #74

Closed boonleng94 closed 6 years ago

boonleng94 commented 6 years ago

Prerequisites

Basic information

Estimote SDK version: com.estimote:proximity-sdk:1.0.0

Android devices affected: Google Pixel 2XL

Android OS version affected: Android 8.1.0

Beacon hardware version: Hardware Version F3.3

Description

Encountered Bluetooth Low Energy scan failed with error code: 2, error as reported in log attached.

(Optional) Steps to reproduce:

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Expected behavior: Proximity observer to start observing for my beacons with tag "home"

Actual behavior: App encountered Bluetooth Low Energy scan failed with error code: 2

Additional information

Code: 
proximityObserver = ProximityObserverBuilder(applicationContext, (application as CloudController).proximityCloudCredentials)
                .withLowLatencyPowerMode()
                //.withScannerInForegroundService(notif)
                .onError { /* handle errors here */
                    msg ->
                    Log.d("iGuide", msg.message)
                }
                .build()

RequirementsWizardFactory.createEstimoteRequirementsWizard().fulfillRequirements(this,
                // onRequirementsFulfilled
                {
                    Log.d("iGuide", "requirements fulfilled")
                    observationHandler = proximityObserver.startObserving(venueZone)
                    observationHandler2 = proximityObserver.startObserving(venueFarZone)
                    Log.d("iGuide", "Obs started")
                },
                // onRequirementsMissing
                { requirements ->
                    Log.d("iGuide", "requirements missing: $requirements")
                }
                // onError
        ) { throwable ->
            Log.d("iGuide", "requirements error: $throwable")
        }

Error: 
Bluetooth Low Energy scan failed with error code: 2
pawelDylag commented 6 years ago

Hey @boonleng94

Duplicated issue. Track it here -> https://github.com/Estimote/Android-Proximity-SDK/issues/48