How can we identify boss device disconnected?

How can we identify boss device disconnected?

KetanSodvadiyaKetanSodvadiya Member Posts: 20
Hello,

When device is connected and inBetween when device is disconnected then i need to achieve another functionality. so how can i identify my bose device is disconnected to my device?

Thanks.

Answers

  • Nadine@Bose[email protected] Member Posts: 111
    Hi @KetanSodvadiya,

    You'll be managing your sessions in your delegate, WearableDeviceSessionDelegate. When a device is disconnected, it'll hit the delegate method and one of the functions under the delegate will get called. 

    https://developer.bose.com/docs/ios-wearable-sdk/4.0.8/Protocols/WearableDeviceSessionDelegate.html

    Try taking a look at this:  session(_:didCloseWithError:)

    Does this help you?

    Best,
    n
  • ericdoleckiericdolecki Member Posts: 15
    Conform to the WearableDeviceSessionDelegate. 

    And then something I have used.

    func session(_ session: WearableDeviceSession, didCloseWithError error: Error?) {

            if error != nil {

                print("Session closed error: \(error!)")

                if (error?.localizedDescription.contains("disconnected from us"))! {

                    //if error?.localizedDescription == "The specified device has disconnected from us." {

                    let alert = UIAlertController(title: "Disconnected", message: "Your device has disconnected.", preferredStyle: .alert)

                    alert.addAction(UIAlertAction(title: "OK", style: .default, handler: nil))

                    self.present(alert, animated: true)

                }

            }

        }

  • KetanSodvadiyaKetanSodvadiya Member Posts: 20
    Hi @KetanSodvadiya,

    You'll be managing your sessions in your delegate, WearableDeviceSessionDelegate. When a device is disconnected, it'll hit the delegate method and one of the functions under the delegate will get called. 

    https://developer.bose.com/docs/ios-wearable-sdk/4.0.8/Protocols/WearableDeviceSessionDelegate.html

    Try taking a look at this:  session(_:didCloseWithError:)

    Does this help you?

    Best,
    n
    Yes, We have already did that and handled delegates methods but there are just i wan to check its same SDK allow to paring NC700 Headphone? 


    Thank you For the your concern  
  • edited 08/14/2019 - 16:04
    Nadine@Bose[email protected] Member Posts: 111
    Hi,

    Yes, it is the same SDK for pairing with the NC700's. The SDK works cross platform with the Frames, QC35II's and 700'S. HOWEVER----  the gestures that you will use between these devices ARE NOT THE SAME! .   

    Frames and 35'ii's: you have affirmative and negative and input: head nod, head shake, double tap

    For the 700's: the affirmative, negative, and input are a little different: headnod, headshake, and touch  and hold. 
Sign In or Register to comment.