How can i identify Connected device is Bose Frame or NC 700 Bose headphone or Bose qc35 headphone?

How can i identify Connected device is Bose Frame or NC 700 Bose headphone or Bose qc35 headphone?

edited 09/03/2019 - 14:14 in Bose AR SDK for iOS
KetanSodvadiyaKetanSodvadiya Posts: 12Member
Hello,

Here when we connect device and how can i identify connection device is Bose Frame or NC 700 Bose headphone or Bose qc35 headphone?

https://www.dropbox.com/s/ihgw2zte5z4nko8/BoseFrame.PNG?dl=0

I also attached image file. In this we draw one square red box of original name. how can i get this original name? or how can i identify connected device?

Thanks.

Answers

  • daniel@bose[email protected] Posts: 33Moderator
    @KetanSodvadiya

    Thanks for your question.  
    The wearable device session contains information about the connected device.   You get to it by looking at the session?.device?.wearableDeviceInformation returned from your active session.  The productID returns a value for each device type.  

    We don't currently document this, so I'll take a note back to the team to consider documenting each device's productID. 
    In the meantime, here's a short list of the product ID's.

    productID: 16420, name: "NC 700",

    productID: 16428, name: "Frames Rondo"

    productID: 16460, name: "Frames Alto"

    productID: 16416, name: "Quiet Comfort 35 II"


    Also to implement this in a dynamic fashion within the UI It's useful to build a helper method to map the product ID to something more useful like a structure of Images, and features like noise canceling support, for example.

    I've worked on projects where I use the device's product ID to dynamically change a UI image of each device.   Other use cases might be,  handle on-boarding instructions differently for the NC700's vs our other products.  

    So it's fairly simple to first create a structure to capture each device we are interested in:

    struct BoseProduct:Hashable {

        var productID: UInt16

        var name: String

        var image: UIImage

        var hasControlableNoiseCancelationFeatures: Bool

    }


    And then build function to determine which product ID, build an array of lookup values and then query that array to get references to product images in the project. 

     private func setCurrentDevice() -> Void {

     

           let productID:UInt16 =  (session?.device?.wearableDeviceInformation!.productID)!;

           let products:Array =  [

                BoseProduct(productID: 16420, name: "Headphones 700", image: UIImage(imageLiteralResourceName: "headphone700-silver"), hasControlableNoiseCancelationFeatures: true),

                 BoseProduct(productID: 16428, name: "Frames Rondo", image: UIImage(imageLiteralResourceName: "frames-rondo"), hasControlableNoiseCancelationFeatures: false),

                 BoseProduct(productID: 16460, name: "Frames Alto", image: UIImage(imageLiteralResourceName: "frames-alto"), hasControlableNoiseCancelationFeatures: false),

                  BoseProduct(productID: 16416, name: "Quiet Comfort 35 II", image: UIImage(imageLiteralResourceName: "headphones-qc35-black"), hasControlableNoiseCancelationFeatures: false)];

            // Search for the current device return structure of BoseProduct     

                currentDevice = products.first(where: { (BoseProduct) -> Bool in

                    return  (BoseProduct.productID  == productID)

                })!

            

            self.hasControlableNoiseCancelationFeatures = currentDevice.hasControlableNoiseCancelationFeatures;

                print(currentDevice!)

        }


    I hope that helps!

    @[email protected]


Sign In or Register to comment.