maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   No notification when new voicemail ? Here come the patch ! (https://talk.maemo.org/showthread.php?t=94498)

Zeta 2015-01-20 21:46

No notification when new voicemail ? Here come the patch !
 
2 Attachment(s)
Update:
Patch is uploaded on openrepos:
https://openrepos.net/content/zeta/p...l-notification

You can now download it directly from warehouse (search for "voicemail") and apply it with patch-manager !


Detailed description

For people having the "No notification when new voicemail" problem, and who don't have an SMS as a fallback, here is a patch that works for me (France, B&You operator).

You can find all details of the bug here : https://together.jolla.com/question/...#post-id-76513

Finally, the patch to show a voicemail icon on the lockscreen is below.

I am quite new to QML and really new to Ofono, so this may not be the best way to do it, for it seems to work for me after some tests.

Code:

--- /usr/share/lipstick-jolla-home-qt5/lockscreen/Lockscreen.qml.orig        2015-01-20 20:55:32.224928108 +0100
+++ /usr/share/lipstick-jolla-home-qt5/lockscreen/Lockscreen.qml        2015-01-20 22:22:28.496361601 +0100
@@ -12,6 +12,7 @@
 import org.nemomobile.time 1.0
 import "../notifications"
 import "../scripts/desktop.js" as Desktop
+import MeeGo.QOfono 0.2
 
 MouseArea {
    id: lockScreen
@@ -254,6 +255,20 @@
        anchors.bottom: clock.top
    }
 
+    OfonoManager { id: ofonoManager }
+
+    OfonoMessageWaiting {
+        id: ofonoMessageWaiting
+        modemPath: ofonoManager.modems.length > 0 ? ofonoManager.modems[0] : ""
+    }
+
+    Image {
+        anchors.bottom: clock.top
+        source: "/usr/share/themes/jolla-ambient/meegotouch/icons/icon-s-voicemail.png"
+        visible: ofonoMessageWaiting.voicemailWaiting
+    }
+
+
    SneakPeekHint {
        id: sneakPeekHint
    }

After applying this patch (take care, it can break things, so keep an SSH session opened and a backup of the file!), you'll need to restart lipstick to be used : devel-su systemctl-user restart lipstick.service

Attached is an image of what it currently looks like (screenshot taken while in low power mode, but it is also shown when unlocked). The icon doesn't follow the ambiance theme, I think this is due to using a full path and not the "image://theme/xxx" as I have seen somewhere else, but it found the image that way.

First image is using file icon-lock-voicemail.png, second one is using icon-s-voicemail.png which looks more like sailfish UI but is less visible (the way I displayed it, could be improved by a UI guru). Don't take care of the 2 new mails in the second image, the voicemail is the small one at the bottom left...

Next step is to look how to make a patch for patch-manager, and submit it to warehouse for it to be available to everyone.

If someone want to help me on this (publishing the patch, correcting problems in that QML, or making it look beautiful), I would be glad.

coderus 2015-01-20 22:39

Re: No notification when new voicemail ? Here come the patch !
 
Very good hack/fix imho. Need help in building rpm with patch for patchmanager?

Zeta 2015-01-20 23:17

Re: No notification when new voicemail ? Here come the patch !
 
Quote:

Originally Posted by coderus (Post 1457430)
Very good hack/fix imho.

Thanks ! :o
Quote:

Originally Posted by coderus (Post 1457430)
Need help in building rpm with patch for patchmanager?

Yes.
I have not yet started to read documentation on how it works.

I don't know how much time is needed to create such a patch. Do you have some pointers to forum thread to read, howtos or examples ?

Also I will need to see how to put them in warehouse when done. Here also, any link or doc explaining the process would be of great use.

Thanks !

coderus 2015-01-20 23:25

Re: No notification when new voicemail ? Here come the patch !
 
Not too much. It's about 5 minutes.

https://dl.dropboxusercontent.com/u/...1-1.noarch.rpm

Zeta 2015-01-20 23:29

Re: No notification when new voicemail ? Here come the patch !
 
2 Attachment(s)
Following a tip from r0kk3rz, I made a test with this code (standalone, not connected to ofono), and it provides notifications on the lockscreen and in the events view as is already done for SMS and mails.
So no need to say it looks a lot better than what I did.

Code:

            Button {
                Notification {
                    id: notification
                    category: "x-nemo.messaging.voicemail"
                    summary: "Notification summary"
                    body: "Notification body"
                    previewSummary: "Notification preview summary"
                    previewBody: "Notification preview body"
                    itemCount: 5
                    timestamp: "2013-02-20 18:21:00"
                }
                text: "Application notification, ID " + notification.replacesId
                onClicked: {notification.publish(); }
            }

The trick is the : category: "x-nemo.messaging.voicemail" which triggers some specific icons and display logic.

Questions are where should this be put (it is ugly to put it in the lockscreen code if it is not anymore related to graphical stuff, but only to connect ofono to notification mechanism) ?

And how to keep it there until the message is really read (not simply clicked) ?
There is "x-nemo-user-removable=true" in the https://github.com/nemomobile/nemo-q...tification.cpp documentation, which can be the solution.
Then the notification index return when creating it should only be kept to later delete it when ofono says all messages have been read.

And the number of message here set to 5 for the test, will obviously not be shown for people where it is not availlable, but on operators where it is provided there is not reason not to use it.

Zeta 2015-01-20 23:32

Re: No notification when new voicemail ? Here come the patch !
 
Quote:

Originally Posted by coderus (Post 1457432)
Not too much. It's about 5 minutes.

https://dl.dropboxusercontent.com/u/...1-1.noarch.rpm

It is too late for today, I should already be sleeping...
Will take a look at it tomorrow if possible.

Thanks !

romu 2015-01-21 07:29

Re: No notification when new voicemail ? Here come the patch !
 
Excellent Zeta ! Can't wait the rpm...

This makes a lot of patches Jolla should integrate into Sailfish !

EDIT: stupido I'm, thanks @coderus. :D

mousse04 2015-01-22 10:46

Re: No notification when new voicemail ? Here come the patch !
 
Finally :). Thanks a lot Zeta ;)

meldolion 2015-01-22 14:54

Re: No notification when new voicemail ? Here come the patch !
 
How do you get the preferences shortcuts on your notification screen?

coderus 2015-01-22 17:21

Re: No notification when new voicemail ? Here come the patch !
 
Quote:

Originally Posted by meldolion (Post 1457586)
How do you get the preferences shortcuts on your notification screen?

this way: https://openrepos.net/content/coderu...ettings-applet


All times are GMT. The time now is 20:18.

vBulletin® Version 3.8.8