Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImediateAlertService::NoAlert doesn't dissmiss phone call on PineTime #297

Closed
jmlich opened this issue Oct 24, 2023 · 0 comments · Fixed by #391
Closed

ImediateAlertService::NoAlert doesn't dissmiss phone call on PineTime #297

jmlich opened this issue Oct 24, 2023 · 0 comments · Fixed by #391

Comments

@jmlich
Copy link
Contributor

jmlich commented Oct 24, 2023

When phone call comes following notifications appears on the PineTime:

  • Incoming call notification (with answer/hangup/silence buttons)
  • Immediate Alert Notification with level No Alert when call is ended

I have traced the problem to the following code:

if (m_voiceCallController.ringing()) {
    m_device->incomingCall(caller);
} else {
   m_device->immediateAlert(ImmediateAlertService::No_Alert);
}

Namely, I am referring to this function (Line 200):

if (m_voiceCallController.ringing()) {
QString caller = m_voiceCallController.findPersonByNumber(m_voiceCallController.callerId());
if (AmazfishConfig::instance()->appTransliterate()) {
m_device->incomingCall( Transliterator::convert( caller ) );
} else {
m_device->incomingCall(caller);
}
} else {
if (m_device->service("00001802-0000-1000-8000-00805f9b34fb")){
m_device->service("00001802-0000-1000-8000-00805f9b34fb")->writeValue("00002a06-0000-1000-8000-00805f9b34fb", QByteArray(1, 0x00)); //TODO properly abstract immediate notification service
}
}

On the PineTime, this code results in a notification displaying the text "No Alert," which is not the intended behavior. According to the InfiniTime code, there currently isn't a way to dismiss this notification. I was checking also GadgetBridge and it doesn't specify any action to dismiss phone call in PineTime part of code

https://github.com/Freeyourgadget/Gadgetbridge/blob/0f7fa7593130a51d7d95a90301cdfe1bd63ba447/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pinetime/PineTimeJFSupport.java#L405

I recommend adding a device-specific function, m_device->incomingCallEnded();, which will send the Immediate Alert Service "No Alert" message only for devices where it is appropriate.

I wasn't able to track it for other devices, because I don't understand how TransactionBuilder oricess performInitialized("end call").

Do we have information about which devices the original code was functioning correctly for?

I guess I will update also #289 according to that.

@jmlich jmlich changed the title Imediate Alert Service No Alert to dissmiss phone call doesn't work for PineTime ImediateAlertService::NoAlert doesn't dissmiss phone call on PineTime Oct 24, 2023
jmlich added a commit to jmlich/harbour-amazfish that referenced this issue Aug 24, 2024
jmlich added a commit to jmlich/harbour-amazfish that referenced this issue Aug 24, 2024
@piggz piggz closed this as completed in e5e34fb Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant