Comments (10)
AFAIK that's not allowed.
from ble.
@EddyVerbruggen In android, apps can enable bluetooth. It shows up a prompt that user can choose allow or deny from. I think that's better then opening up notifications and then enabling Bluetooth.
from ble.
Ah interesting. Can you share an app that does that, or even better, point me at the relevant docs/code?
from ble.
@EddyVerbruggen
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); mBluetoothAdapter.enable();
we'll need these permissions in manifest for native android applications
<uses-permission android:name="android.permission.BLUETOOTH"/> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
solution from this page.
Here's the official documentation .
Also, can you guide me on how to implement this? I'd like to do this one on my own, and then a PR maybe.
from ble.
PR #44 that adds this feature has just been merged. You can expect a new version on npm soon.
from ble.
@EddyVerbruggen mind if I implement this in the Bluetooth demo app?
from ble.
@aaayushsingh Ha, thanks for offering but I'm working on a better implementation of this feature and also have an updated version of the demo app locally. Expecting to push it in a few hours!
from ble.
@aaayushsingh The demo has been updated and 1.2.0 has been published.
from ble.
So now I can boast in front of my friends about my first real PR getting merged.
Thanks.
from ble.
Yes sir you can! Thanks so much, and I hope this is the first of many to any repo out there 👍 👍
from ble.
Related Issues (20)
- Monitor Region HOT 1
- bluetooth.connect with autoDiscoverAll hangs on iOS for BT Assigned Numbers HOT 5
- demo-ng - update to latest nativescript and angular HOT 2
- Android - Characteristics Read, Write and Discover not working HOT 1
- service_not_found HOT 3
- Android issue with readCharacteristic call
- error_function_call HOT 6
- (android) startScanning unhandled rejection if user denies location permissions
- (Android) enableGPS does not attempt to enable GPS due to incorrect isGPSEnabled check HOT 1
- (iOS) startScanning() not working HOT 2
- TypeError: Cannot read properties of undefined (reading 'toLowerCase') HOT 6
- sdk 33 , permission BLUETOOTH_SCAN on startScanning HOT 1
- Can't read GATT characteristic on Android SDK 33 HOT 1
- (android) App crash on write HOT 2
- scanning does nothing and does not stop after specified time HOT 5
- Filtering for manufacturerId does not work when scanning HOT 1
- (Android) Function enable throws error on Android 13 HOT 1
- ERROR appears while executing bluetooth.write() (bluetooth class are undefined ) HOT 6
- Scan throws error on android 13+ HOT 3
- Issue running the Bluetooth plugin inside my worker HOT 3
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 ble.