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

  • Thanks for the report, we will test locally and update with our findings!
  • Brigid, I was able to successfully filter by App Identifier.  Can you please make sure you have the latest firmware on your device and are using the latest MetaWear SDK in your app?

    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.

    Thanks,
    -Stephen
This discussion has been closed.