Skip to main content

EnsLib.PushNotifications.IdentityManager.DeviceTracking

persistent class EnsLib.PushNotifications.IdentityManager.DeviceTracking extends %Library.Persistent, %XML.Adaptor

SQL Table Name: EnsLib_PushNotifications_IdentityManager.DeviceTracking

Zen Mobile Cloud Messaging Device Tracking

Property Inventory

Method Inventory

Properties

property AppIdentifier as %String (MAXLEN = 512) [ Required ];
App Identifier
Property methods: AppIdentifierDisplayToLogical(), AppIdentifierGet(), AppIdentifierGetStored(), AppIdentifierIsValid(), AppIdentifierLogicalToDisplay(), AppIdentifierLogicalToOdbc(), AppIdentifierNormalize(), AppIdentifierSet()
property AssociatedAppTokens as list of %String (MAXLEN = 512) [ Required ];
Associated Application Token
Property methods: AssociatedAppTokensBuildValueArray(), AssociatedAppTokensCollectionToDisplay(), AssociatedAppTokensCollectionToOdbc(), AssociatedAppTokensDisplayToCollection(), AssociatedAppTokensDisplayToLogical(), AssociatedAppTokensGet(), AssociatedAppTokensGetObject(), AssociatedAppTokensGetObjectId(), AssociatedAppTokensGetStored(), AssociatedAppTokensGetSwizzled(), AssociatedAppTokensIsValid(), AssociatedAppTokensLogicalToDisplay(), AssociatedAppTokensLogicalToOdbc(), AssociatedAppTokensNormalize(), AssociatedAppTokensOdbcToCollection(), AssociatedAppTokensSet(), AssociatedAppTokensSetObject(), AssociatedAppTokensSetObjectId()
property Identifier as %String (MAXLEN = 512) [ Required ];
Device Identifier (i.e. DeviceToken, or Registration Id)
Property methods: IdentifierDisplayToLogical(), IdentifierGet(), IdentifierGetStored(), IdentifierIsValid(), IdentifierLogicalToDisplay(), IdentifierLogicalToOdbc(), IdentifierNormalize(), IdentifierSet()
property LastUpdatedUTC as %TimeStamp [ InitialExpression = $ZDT($system.Util.LocalWithZTIMEZONEtoUTC($H),3) , Required ];
Last updated-at timestamp
Property methods: LastUpdatedUTCDisplayToLogical(), LastUpdatedUTCGet(), LastUpdatedUTCGetStored(), LastUpdatedUTCIsValid(), LastUpdatedUTCLogicalToDisplay(), LastUpdatedUTCLogicalToXSD(), LastUpdatedUTCNormalize(), LastUpdatedUTCOdbcToLogical(), LastUpdatedUTCSet(), LastUpdatedUTCXSDToLogical()
property Service as %String (DISPLAYLIST = ",Apple Push Notification Service,Google Cloud Messaging", VALUELIST = ",APNS,GCM") [ Required ];
Service type descriptor
Property methods: ServiceDisplayToLogical(), ServiceGet(), ServiceGetStored(), ServiceIsValid(), ServiceLogicalToDisplay(), ServiceLogicalToOdbc(), ServiceNormalize(), ServiceSet()

Methods

classmethod AssociateDeviceWithAppToken(pIdentifier As %String, pAppId As %String, pService As %String, pAppToken As %String) as %Status
Associate an application token with a deviceid/appid.

pIdentifier is the device token given to the remote device by the notification service.
pAppId is the application identifier (if applicable, not needed for APNS) associated with your application.
pService is the service identifier, one of:

  • APNS: Apple Push Notification Service
  • GCM: Google Cloud Messaging
pAppToken is the unique application token/identifier that you wish associated with this device.
classmethod DisassociateDeviceWithAppToken(pIdentifier As %String, pAppId As %String, pService As %String, pAppToken As %String) as %Status
Disassociate an application token from an identifier/appid.

pIdentifier is the device token given to the remote device by the notification service.
pAppId is the application identifier (if applicable, not needed for APNS) associated with your application.
pService is the service identifier, one of:

  • APNS: Apple Push Notification Service
  • GCM: Google Cloud Messaging
pAppToken is the unique application token/identifier that you associated with this device.
classmethod FindDeviceByAppToken(pAppToken As %String, ByRef pDevice As EnsLib.PushNotifications.IdentityManager.DeviceTracking) as %Status
Locate a device tracking object by an app token
classmethod FindDeviceByDeviceAndAppIds(pIdentifier As %String, pAppId As %String, pService As %String, ByRef pDevice As EnsLib.PushNotifications.IdentityManager.DeviceTracking, pCreate As %Boolean = 0) as %Status
Helper to locate and/or create a device tracking object from a deviceid/appid pair

Queries

query DeviceSearchByAppToken(pAppToken As %String)
SQL Query:
SELECT %ID, Service, Identifier, LastUpdatedUTC FROM DeviceTracking WHERE FOR SOME %ELEMENT(AssociatedAppTokens) (%Value = :pAppToken)
Search for devices matching the associated app token

Indexes

index (AppIdentifierIndex on AppIdentifier);
Index the app identifier
Index methods: AppIdentifierIndexExists()
index (AssociatedAppTokensIndex on AssociatedAppTokens(ELEMENTS));
Index the associated app tokens (all of them) with this object
index (IDKEY on ) [IdKey, Type = key];
Index methods: IDKEYCheck(), IDKEYDelete(), IDKEYExists(), IDKEYOpen(), IDKEYSQLCheckUnique(), IDKEYSQLExists(), IDKEYSQLFindPKeyByConstraint(), IDKEYSQLFindRowIDByConstraint()
index (IdentifierIndex on Identifier);
Index the device identifier
Index methods: IdentifierIndexExists()
index (ServiceIndex on Service);
Index the service
Index methods: ServiceIndexExists()

Inherited Members

Inherited Methods

Storage

Storage Model: Storage (EnsLib.PushNotifications.IdentityManager.DeviceTracking)

^EnsLib.Push216E.DeviceTrackingD(ID)
=
%%CLASSNAME
Service
Identifier
AppIdentifier
AssociatedAppTokens
LastUpdatedUTC
FeedbackOpens in a new tab