Ask / Submit
5

Help me make "dial from launcher" better

asked 2014-09-24 22:09:00 +0200

ossi1967 gravatar image

updated 2014-09-24 22:10:44 +0200

I come from the N9 and had a little *.desktop file there that allowed me to call a certain number by tapping an icon from the launcher. I tried to copy its behavior like so:

[Desktop Entry]
Name=Order Pizza
Comment=Tap when hungry
Icon=/home/nemo/Pictures/pizza.png
Exec=gdbus call -e -d com.jolla.voicecall.ui -o / -m com.jolla.voicecall.ui.dial '0199999999'
Terminal=false
Type=Application
Categories=Utility;

(File is pizza.desktop and is lives in /home/nemo/.local/share/applications/)

This will call the number '0199999999' immediately after I touched the icon. Nice, but not always what I want.

I'd like to have two additional possibilities:

  1. Open the call-UI with the number already filled in, but wait for me to press "dial" (just as a security measure)
  2. Open the contact card that the number belongs to, also highlight the number if the contact has more than one, wait for me to press either "call" or "sms"... or choose another item from the list

Or, as an alternative to point 2, just call the contact card by using the name or any other parameter that will do.

The question might seem odd given I already have got dbus magic working... problem is I have not the faintest idea what I did there with gdbus. IIRC, I found it in some IRC logs and copypasted it without really knowing what it is. :)

Anyone here who could help me with 1. or 2. or both? :)

edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted
2

answered 2014-09-24 23:51:12 +0200

For the first one, you could have use qml code calling: Qt.openUrlExternally("tel:012345xxxxx")

This will open an dialog overlay that prompts if you want to call that number.

edit flag offensive delete publish link more

Comments

I couldn't use Qt.openUrlExternally right from the desktop file in the Exec-line, right? Or from within a bash script? (Or did I miss something?)

But your answer reminded me of something far simpler that used to work on the N9: A link (like the one Jolla uses for shortcuts to websites) in the desktop file. On the N9, the URL in the link could be of type "tel:" - and there should be a fair chance that linking to a tel-URL does pretty much the same as Qt.openUrlExternally.

I'm gonna try as soon as a have SSH access again. :)

ossi1967 ( 2014-09-25 12:00:14 +0200 )edit

Would like to know too...

Schturman ( 2014-09-25 12:07:25 +0200 )edit

OK, I tried to use a desktop-file like the ones that the Sailfish browser creates and change the URL-parameter to "tel:01999..."

This actually works - somehow. But it's ugly as hell. It does not simply bring up the dialer UI, but a huge, semi-funktional overlay similar to the one that asks me which wifi to connect to. In this overlay, I can choose if I want to dial or abort. (Dialling" is represented by two buttons, only one of them works, the other doesn't react to clicks.)

So while it's functional, it's just too ugly to be used.

ossi1967 ( 2014-09-26 11:38:41 +0200 )edit
1

Anyway quick dial from your first post work very well and very useful... for me at least, thanks

Schturman ( 2014-09-26 12:09:34 +0200 )edit
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2014-09-24 22:09:00 +0200

Seen: 323 times

Last updated: Sep 24 '14