Estimote / react-native-proximity

React Native wrapper for Estimote Proximity SDK
Apache License 2.0
61 stars 38 forks source link

Unable to start bluetooth LE scanner #3

Closed milesmatthias closed 6 years ago

milesmatthias commented 6 years ago

Some devices don't support bluetooth LE scanning, but the Estimote SDK doesn't provide a way to catch that error and do something. Instead, I'm just seeing a Java error:

java.lang.IllegalStateException
Unable to create bluetooth LE scanner instance

An onError callback with a message of "device unsupported" or something like that is what we need, instead of a Java exception being raised.

heypiotr commented 6 years ago

Just realized I've never replied to this one, so I just want to assure you we've seen it the day you posted it, and it's something to be addressed in the native Android Proximity SDK.

In fact, now that I think about it, it's somewhat related to #1: currently there's a bug where the exceptions to be reported to the onError handler get thrown instead.

I'll leave both open for the time being though, since they're two different use cases.

milesmatthias commented 6 years ago

Any update on this and #1 @heypiotr ?

heypiotr commented 6 years ago

I'm still waiting for this to be fixed in the native SDK :(

heypiotr commented 6 years ago

In 0.4.0, the app will no longer crash on onError. This doesn't entirely solve the problem of "how do I know/handle BLE unsupported or Bluetooth off/state changes", but let's track that in #9.