Flic Home

    Community

    • Login
    • Search
    • Popular
    • Users

    Detecting on Android if the OS bluetooth is on or off

    Developers
    2
    2
    321
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • info 6
      info 6 last edited by

      Our developer, that is implementing the Flic2 library for our App, told us that in your API there is no way to detect, on opening the library, if the system bluetooth is on or off and, consequently, advise the User.

      While we solved that on iOS, I would like to know if there is a way, in the Android API, to do this.

      As you can image, having the bluetooth off without knowing it, the user may think that is the App that doesn’t work and we have no mean of how to advise him of this fact.

      Thanks

      1 Reply Last reply Reply Quote 0
      • Emil
        Emil FlicTeam last edited by Emil

        Hi, just use this method: https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#isEnabled(). Or use https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#ACTION_STATE_CHANGED to listen to state changes.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post