This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to answer incomming call in IOS , use ble HID?

My report like this below

0x05, 0x0C,                     // Usage Page (Consumer)
        0x09, 0x05,                     // Usage (Consumer Control)
        0xA1, 0x01,                     // Collection (Application)
        0x85, 0x02,                     //     Report Id (2)
        0x15, 0x00,                     //     Logical minimum (0)
        0x25, 0x01,                     //     Logical maximum (1)
        0x75, 0x01,                     //     Report Size (1)
        0x95, 0x01,                     //     Report Count (1)

        0x09, 0xCD,                     //     Usage (Play/Pause)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0x0A, 0x83, 0x01,               //     Usage (AL Consumer Control Configuration)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0x09, 0xB5,                     //     Usage (Scan Next Track)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0x09, 0xB6,                     //     Usage (Scan Previous Track)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)

        0x09, 0xEA,                     //     Usage (Volume Down)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0x09, 0xE9,                     //     Usage (Volume Up)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0x0A, 0x25, 0x02,               //     Usage (AC Forward)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0x0A, 0x24, 0x02,               //     Usage (AC Back)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0xC0                            // End Collection	

I can accept incomming call in Android , Use Play Key or Key "Media select Telephone" 0x8C .But this can not work in IOS10.3.1. In IOS PLAY/PAUSE/PRE TRACK/NEXT TRACK/VOLUME INCREMENT/DECREMENT can work, But can not Answer call . I set the key code Based on the doc USB HID usage table. I have checked in this forum and Google for server days .

  • Hi Bigz,

    I have no information if you can do that with HID on iOS but you can think of using ANCS ?

    "The actual actions performed by the NP on behalf of the NC are determined by the NP and vary depending on the iOS notification they are performed on. For example, performing a positive action on an Incoming Call notification may answer it, while performing a negative action may decline it."

    We have an ANCS example in our SDK showing this.

  • Thanks, Use ancs can answer IOS incoming call. I have new question, when answer incoming call, then how to end the call?

    use code below can answer incoming call. ret = nrf_ancs_perform_notif_action(&m_ancs_c, m_notification_latest.notif_uid, ACTION_ID_POSITIVE);

  • I haven't tried my self. But if you call the action function again with ACTION_ID_NEGATIVE would you be able to end the call ? If you can't I would assume that you need to have a notification from the phone about the ongoing call and then can choose to do negative action on it.

    Have you tried to ask on an Apple's forum ?

  • Hi.

    There is any solutions to end a call? with ACTION_ID_NEGATIVE i can't end call.

    best regards

  • Hello

    I'm also trying to answer to an incoming call. Could you please give me more details about how to proceed ? Which event are you sending ?

    Can you decline a phone code ?

    Best regards,

    Aurélien

1 2