Comments (5)
Are you running this in the simulator? Any bluetooth services cannot be used on the simulator.
from blue-falcon.
I've checked this on 5s and 11 (physical devices)
from blue-falcon.
Can you send me a zipped version of the project? I would also suggest you have a look at the example projects in this repo.
from blue-falcon.
By the way, in my code its named LibraryBlueFalcon because kotlin made header file with prefixes to distinguish K/N libraries
from blue-falcon.
So when performing the scan function, the physical device can give a bluetooth status of Unknown, this is common, i would recommend catching and putting in a wait/dispatch.
do { try viewModel.scan() } catch { let error = error as NSError switch error.userInfo["KotlinException"] { case is BluetoothPermissionException: showError(message: Strings.Errors.Bluetooth.permission) case is BluetoothNotEnabledException: showError(message: Strings.Errors.Bluetooth.notEnabled) case is BluetoothUnsupportedException: showError(message: Strings.Errors.Bluetooth.unsupported) case is BluetoothResettingException: showError(message: Strings.Errors.Bluetooth.resetting) default: DispatchQueue.main.asyncAfter(deadline: .now() + 1) { self.scan() } } }
from blue-falcon.
Related Issues (20)
- Add information about Bluetooth Classic to the README or change terminology to "BLE" HOT 2
- iOS use HOT 3
- Kotlin MP Example HOT 9
- Runtime Permissions not acquired for BLUETOOTH_CONNECT
- Allow log configuration HOT 2
- How to use communication by BluetoothSocket in common code? HOT 4
- Addition of Compose Multiplatform example project HOT 4
- GPLv3 is a pain HOT 7
- Bonding callback HOT 4
- Bluetooth not work on Android 11 API 30 HOT 19
- Notification/Indication HOT 3
- iOS / Android diferncies HOT 11
- The characteristic value change delegate never fire HOT 11
- Latest release failing due to no xcode 13 support on github HOT 14
- BlueFalcon not found in iOS HOT 12
- Kotlin KMM dev.bluefalcon.BluetoothUnknownException: Unknown error happened HOT 15
- The project 'blue-falcon' is not a Gradle-based project HOT 17
- Notify not working on Android HOT 6
- Second disconnect not working (Android) HOT 3
- didWriteValueForCharacteristic not trigger short time after connection in IOS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blue-falcon.