Datasheet
Certain alerts (such as incoming calls) can also have actions associated with them, making use of the three buttons on
the left-hand side of the display to decide which action to take.
In the ancs_oled example, we have a special section of code for incoming calls where you can accept or decline a call
with an appropriate button press:
// Check buttons
uint32_t presedButtons = readPressedButtons();
if ( myNotifs[activeIndex].ntf.categoryID == ANCS_CAT_INCOMING_CALL )
{
/* Incoming call event
* - Button A to accept call
* - Button C to decline call
*/
if ( presedButtons & bit(BUTTON_A) )
{
bleancs.actPositive(myNotifs[activeIndex].ntf.uid);
}
if ( presedButtons & bit(BUTTON_C) )
{
bleancs.actNegative(myNotifs[activeIndex].ntf.uid);
}
}
© Adafruit Industries https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide Page 149 of 175