AttributeId Filter and Notification Issues
I would like the MetaWear R to flash its LED when a notification from my app is received by the phone.
I’m using MetaWear’s iOS SDK, in device.acs.eventWithCategoryIds, I set my attributeId to MBLANCSNotificationAttributeID.AppIdentifier and provided my app’s identifier as attributeData.
The MetaWear board was able to respond to all notifications when the event was created without the attributeId filter, but adding the attributeId filter prevents it from responding to any notifications.
Any assistance would be much appreciated. The relevant code is provided below…
let event5:MBLEvent = device.ancs.eventWithCategoryIds(MBLANCSCategoryID.Any, eventIds: MBLANCSEventID.NotificationAdded, eventFlags: MBLANCSEventFlag.Any, attributeId: MBLANCSNotificationAttributeID.AppIdentifier, attributeData: "MY_APPIDENTIFIER”)
Comments
I used the App here, https://github.com/mbientlab/ANCS, with a small modification to filter AppId instead of Title. Also, make sure you are using the Bundle Identifier of the App you want to filter on, which should be something like "com.mbientlab.ANCS" for the attributeData.