Coder Social home page Coder Social logo

Comments (10)

EddyVerbruggen avatar EddyVerbruggen commented on May 26, 2024

AFAIK that's not allowed.

from ble.

aaayushsingh avatar aaayushsingh commented on May 26, 2024

@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.

EddyVerbruggen avatar EddyVerbruggen commented on May 26, 2024

Ah interesting. Can you share an app that does that, or even better, point me at the relevant docs/code?

from ble.

aaayushsingh avatar aaayushsingh commented on May 26, 2024

@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 .

here's a screenshot.
image

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.

EddyVerbruggen avatar EddyVerbruggen commented on May 26, 2024

PR #44 that adds this feature has just been merged. You can expect a new version on npm soon.

from ble.

aaayushsingh avatar aaayushsingh commented on May 26, 2024

@EddyVerbruggen mind if I implement this in the Bluetooth demo app?

from ble.

EddyVerbruggen avatar EddyVerbruggen commented on May 26, 2024

@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.

EddyVerbruggen avatar EddyVerbruggen commented on May 26, 2024

@aaayushsingh The demo has been updated and 1.2.0 has been published.

from ble.

aaayushsingh avatar aaayushsingh commented on May 26, 2024

So now I can boast in front of my friends about my first real PR getting merged.

Thanks.

from ble.

EddyVerbruggen avatar EddyVerbruggen commented on May 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.