• Update: I tried, but failed:

    I added some code to the android.boot.js: (No pull request, because it obviously doesn't work)

        function gbSend(message) {
            Bluetooth.println("");
            Bluetooth.println(JSON.stringify(message­));
            return message.n
        }
        Bangle.messageResponse = (msg, response) => {
            if (typeof response == "boolean") {
                if (msg.id == "call") return gbSend({ t: "call", n: response ? "ACCEPT" : "REJECT" });
                if (isFinite(msg.id)) return gbSend({ t: "notify", n: response ? "OPEN" : "DISMISS", id: msg.id });
            }
                if (isFinite(msg.id)) return gbSend({ t: "notify", n: "REPLY", msg: response, id: msg.id });
            } else return false;
        };
    

    (If response is a string -> send it as REPLY. I also added return (ACCEPT/REJECT/OPEN/DISMISS/REPLY, so that whatever triggers Bangle.messageResponse() gets feedback if the response was understood)

    When I respond "OK", I am getting this in my gadgetbridge.log:

    ...
    09:45:09.002 [Binder:4929_1] INFO  n.f.g.s.d.b.BangleJSDeviceSupport - UART RX LINE: {"t":"notify","n":"REPLY","msg":"OK","id­":1646979166}
    09:45:09.002 [Binder:4929_1] INFO  n.f.g.s.AbstractDeviceSupport - Got NOTIFICATION CONTROL device event
    09:45:09.002 [Binder:4929_1] INFO  n.f.g.s.AbstractDeviceSupport - Got notification reply for notification id 1646979166 : OK
    

    looks very promising, but DOES NOT send a reply to the whatsapp contact.

About

Avatar for Micha_home @Micha_home started