Inherits from NSObject
Declared in NADevice.h

Overview

The representation of a device in the system. A device can be used from the time that NAPlatform informs your delegate of its presence until the time it is notified to be lost.

Devices have an NADeviceType associated with them:

 typedef enum
 {
   NATYPE_NEWAER = 1,       // NewAer SDK device
   NATYPE_BEACON = 2,       // Beacon device
   NATYPE_WEARABLE = 3,     // Other wearable device
   NATYPE_WIFI = 4,         // WiFi access point
   NATYPE_BLUETOOTH = 5,    // Bluetooth standard device
   NATYPE_RESERVED = 6      // Reserved
 } NADeviceType;

Devices also have an NADeviceProximity associated with them that can be used to approximate how close they are to the device doing the scanning:

 typedef enum
 {
   NAPROXIMITY_IMMEDIATE = 0,
   NAPROXIMITY_NEAR = 1,
   NAPROXIMITY_FAR = 2,
   NAPROXIMITY_UNKNOWN = 3
 } NADeviceProximity;

Tasks

  • – deviceTypeAsString

    Returns the device type as a string: “NewAer”, “Beacon”, “Wearable”, “WiFi”, “Bluetooth”

  • – deviceTypeAsChars

    Returns the device type as a character string prefix: “NA”, “IB”, “WE”, “WF”, “BS”

  •   name

    Returns the full name of the device: “John Smith’s iPhone”

    property
  •   deviceType

    Returns the device type as an integer: NATYPE_NEWAER, NATYPE_BEACON, etc

    property
  •   deviceId

    Returns the device ID, a unique name not intended for display to the end user

    property
  •   applicationId

    Returns the application ID that the device is associated with. Only valid for NATYPE_NEWAER devices. applicationId may be helpful to determine the device’s purpose if you have registered for friend applicationIds.

    property
  •   deviceInfo

    Returns the contents of the remote device info characteristic. This is user configurable for NATYPE_NEWAER. For NATYPE_WEARABLE, it is taken from the manufacturer data field of the advertising packet, if one exists

    property
  •   lastSeen

    Returns the date that the device was last seen

    property
  •   signalStrength

    Returns the raw signal strength for the device.

    property
  •   signalLevel

    Returns the signal level scaled to 0-100

    property
  •   proximity

    The value in this property gives a general sense of the relative distance to the peer device

    property

Properties

applicationId

Returns the application ID that the device is associated with. Only valid for NATYPE_NEWAER devices. applicationId may be helpful to determine the device’s purpose if you have registered for friend applicationIds.

@property (copy) NSString *applicationId

Declared In

NADevice.h

deviceId

Returns the device ID, a unique name not intended for display to the end user

@property (copy) NSString *deviceId

Declared In

NADevice.h

deviceInfo

Returns the contents of the remote device info characteristic. This is user configurable for NATYPE_NEWAER. For NATYPE_WEARABLE, it is taken from the manufacturer data field of the advertising packet, if one exists

@property (copy) NSData *deviceInfo

Declared In

NADevice.h

deviceType

Returns the device type as an integer: NATYPE_NEWAER, NATYPE_BEACON, etc

@property (assign) NADeviceType deviceType

Declared In

NADevice.h

lastSeen

Returns the date that the device was last seen

@property (copy) NSDate *lastSeen

Declared In

NADevice.h

name

Returns the full name of the device: “John Smith’s iPhone”

@property (copy) NSString *name

Declared In

NADevice.h

proximity

The value in this property gives a general sense of the relative distance to the peer device

@property (assign) NADeviceProximity proximity

Declared In

NADevice.h

signalLevel

Returns the signal level scaled to 0-100

@property (assign) int32_t signalLevel

Declared In

NADevice.h

signalStrength

Returns the raw signal strength for the device.

@property (assign) int32_t signalStrength

Declared In

NADevice.h

Instance Methods

deviceTypeAsChars

Returns the device type as a character string prefix: “NA”, “IB”, “WE”, “WF”, “BS”

- (NSString *)deviceTypeAsChars

Declared In

NADevice.h

deviceTypeAsString

Returns the device type as a string: “NewAer”, “Beacon”, “Wearable”, “WiFi”, “Bluetooth”

- (NSString *)deviceTypeAsString

Declared In

NADevice.h