Search code examples
androidiphonebluetoothconnectionwear-os

Detect if Wear OS device is connected to iPhone


Is there a way to determine if my Android watches are connected to an android phone or an iPhone?

We have a business case do differs between these two cases and use PKCE for android and DAG authorization flow for iPhones. I want to know when to apply each flow


Solution

  • You could use PhoneTypeHelper:

    PhoneTypeHelper.getPhoneDeviceType(context) == PhoneTypeHelper.DEVICE_TYPE_IOS
    

    More info in Details for detecting the type of paired phone.