Skip to content

BluetoothStatus.state is always false #55

Description

@gpawlik

No matter if the Bluetooth is switched on or off (both general settings and app settings) the state comes as false. Am I missing something?

import { BluetoothStatus } from 'react-native-bluetooth-status';
...
async checkBluetoothState() {
    const isEnabled = await BluetoothStatus.state();
    // false
}

When I inspect the state in the line https://github.com/solinor/react-native-bluetooth-status/blob/master/index.js#L28

this.subscription = bluetoothEvent.addListener(BT_STATUS_EVENT, state => {

state is undefined

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions