NADevice Class Reference
| 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
-
– deviceTypeAsStringReturns the device type as a string: “NewAer”, “Beacon”, “Wearable”, “WiFi”, “Bluetooth”
-
– deviceTypeAsCharsReturns the device type as a character string prefix: “NA”, “IB”, “WE”, “WF”, “BS”
-
nameReturns the full name of the device: “John Smith’s iPhone”
property -
deviceTypeReturns the device type as an integer: NATYPE_NEWAER, NATYPE_BEACON, etc
property -
deviceIdReturns the device ID, a unique name not intended for display to the end user
property -
applicationIdReturns 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 -
deviceInfoReturns 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 -
lastSeenReturns the date that the device was last seen
property -
signalStrengthReturns the raw signal strength for the device.
property -
signalLevelReturns the signal level scaled to 0-100
property -
proximityThe 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 *applicationIdDeclared In
NADevice.hdeviceId
Returns the device ID, a unique name not intended for display to the end user
@property (copy) NSString *deviceIdDeclared In
NADevice.hdeviceInfo
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 *deviceInfoDeclared In
NADevice.hdeviceType
Returns the device type as an integer: NATYPE_NEWAER, NATYPE_BEACON, etc
@property (assign) NADeviceType deviceTypeDeclared In
NADevice.hlastSeen
Returns the date that the device was last seen
@property (copy) NSDate *lastSeenDeclared In
NADevice.hname
Returns the full name of the device: “John Smith’s iPhone”
@property (copy) NSString *nameDeclared In
NADevice.hproximity
The value in this property gives a general sense of the relative distance to the peer device
@property (assign) NADeviceProximity proximityDeclared In
NADevice.h