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

Notifycation syncronisation improvements #368

Open
Thaodan opened this issue May 5, 2024 · 4 comments
Open

Notifycation syncronisation improvements #368

Thaodan opened this issue May 5, 2024 · 4 comments

Comments

@Thaodan
Copy link
Contributor

Thaodan commented May 5, 2024

I think notifications should be synchronized between the watch
and device.
For example when a call is accepted on the phone the call notification
doesn't end.
Some notification like those that don't spawn a notification banner
spawn also show on the watch even thou they don't show up in the
events view or outside the app the spawn in.

Removing a notification on one end doesn't remove it from the other end.

@jmlich
Copy link
Contributor

jmlich commented May 6, 2024

This depends on device. For example PineTime (InfiniTime) doesn't have any interface to discard notification/phone call from the phone.

Current implementation sends Immediate Alert Service with Level None to device to indicate, that phone is not ringing anymore. See

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
}
}

However, It causes just another notification in case of the PineTime. I am not sure about behavior of other devices.

I was working on some changes of it in scope of #289, but it still needs some debugging. I can probably split it into multiple pull requests to improve code base first and add features later.

@Tsht
Copy link
Contributor

Tsht commented May 15, 2024

This is the case on Bangle.js, in a latest PR I did something for call notifications, but I don't know yet how to handle this. Phone notification call stays until discarded on the watch.

@jmlich
Copy link
Contributor

jmlich commented Aug 24, 2024

This can improve call notifications: #391
@Tsht can you please test if it works with bangle.js? I have done blind implementation of this function

https://github.com/jmlich/harbour-amazfish/blob/e5e34fb26f7b9cf8cf88b929eb7dd4f4384ff139/daemon/src/devices/banglejsdevice.cpp#L104-L119

@Tsht
Copy link
Contributor

Tsht commented Aug 26, 2024

Sure, will do but I not sure when I can test, I must take the time to get back my environment working before

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

No branches or pull requests

3 participants