Skip to content

Check Bluetooth is Enable #773

Closed

Description

@themmfa

💬 Questions and Help

For location, I can check if its enabled or disabled. However, I couldn't see a serviceStatus property for bluetooth. Is there any way to check if bluetooth is enabled or disabled?

Activity

  1. ChopinDavid commented on Nov 2, 2022

    @ChopinDavid

    I made a fork that resolves this and am waiting for it to get pulled in: #942

  2. self-assigned this
    on Jul 3, 2023
  3. added
    platform: ios
    type: enhancement
    P2
    platform: android
    platform: windows
    on Jul 3, 2023
  4. removed their assignment
    on Jul 4, 2023
  5. wujek-srujek commented on Jul 10, 2023

    @wujek-srujek
    Contributor

    Would be nice to get this merged. In the meantime, I import permission_handler_platform_interface: ^3.11.1 and use PermissionHandlerPlatform.instance.checkServiceStatus(Permission.bluetooth).

  6. JeroenWeener commented on Jul 11, 2023

    @JeroenWeener
    Contributor

    Hi @wujek-srujek, thanks for chiming in.

    We are aiming to get this in soon.
    See #1099, #1100, #1101, #1102 for progress on the feature.

    Please note that the changes there exceed the changes in #942, as we found that the iOS implementation does not correctly return the service status. You may therefore find that you get ServiceStatus.disabled, regardless of the Bluetooth state, when using #942 in combination with permission_handler_platform_interface: ^3.11.1 as you described.

  7. JeroenWeener commented on Jul 13, 2023

    @JeroenWeener
    Contributor

    This issue is waiting for #1100 to be merged.

  8. JeroenWeener commented on Jul 13, 2023

    @JeroenWeener
    Contributor

    Hi everyone!

    The feature is now available on the latest version of the plugin. To pull it in, just run flutter pub upgrade in your project that has a dependency on either permission_handler or permission_handler_apple. Check the pubspec.lock file to make sure the dependency to permission_handler_apple is 9.1.4. As permission_handler_apple is endorsed by permission_handler, you do not need to explicitly list it in your pubspec.yaml file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2platform: androidplatform: iosplatform: windowstype: enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions