Active Topics

 


Reply
Thread Tools
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, España
#1
Hello all,

Some of the original quickactions required an argument to determine which part of the software you were wanting to access. The files were .conf files but are now .json files, the data is almost the same but the syntax is a little different.

I've lost count of the numerous ways I've tried to add my data, but clearly I'm doing something wrong, as my 'shortcut' to "Create a contact" only opens the app but not on the page where we add our new contact.....so what data/code is required?

Here is my original data when we were using quickactions; (note: arguments required)

Code:
    
    priority=0
    icon=icon-m-file-vcard
    title=contacts-me-add_contact
    translation-catalog=contacts
    remote-service="com.jolla.contacts.ui"
    remote-path="/com/jolla/contacts/ui"
    remote-interface="com.jolla.contacts.ui"
    remote-method="createContact"
    remote-arguments/size=1
    remote-arguments/1/argument="createContact"
And here is the data for the new 'Top menu shortcuts', the last 2 lines are the problem I believe;

Code:
{
    "translation_catalog": "lipstick-jolla-home",
    "entries": [
        {
            "path": "system_settings/look_and_feel/topmenu/actions/add_a_contact",
            "title": "Create a contact",
            "translation_id": "settings_quickaction-la-add_a_contact",
            "title_short": "Contact",
            "translation_id_short": "settings_quickaction-la-add_a_contact",
            "type": "action",
            "icon": "image://theme/icon-m-file-vcard",
            "order": 55,
            "params": {
                "type": "grid",
                "remote-service": "com.jolla.contacts.ui",
                "remote-path": "/com/jolla/contacts/ui",
                "remote-interface": "com.jolla.contacts.ui",
                "remote-method": "createContact",

                "remote-arguments/size": 1,
                "remote-arguments/1/argument": "createContact"
            }
        }
    ]
I have tried many different variations to make this work, too many to list. Does anyone have any idea of the code required to make this work?, currently, it opens the app but not on the required page; 'add a contact'

Thanks,
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 

The Following 7 Users Say Thank You to Markkyboy For This Useful Post:
Posts: 31 | Thanked: 117 times | Joined on Nov 2015 @ Mödling
#2
Where are the config files for shortcuts located?

Edit: ok, just found them. For example
Code:
/usr/share/jolla-settings/entries/com.jolla.notes.json
is the shortcut for creating new note.

Last edited by fooxl; 2018-11-06 at 17:34.
 

The Following 4 Users Say Thank You to fooxl For This Useful Post:
Posts: 31 | Thanked: 117 times | Joined on Nov 2015 @ Mödling
#3
If you take a look at
Code:
/usr/share/jolla-settings/entries/com.jolla.internet.json
it uses
Code:
...
"remote-arguments": ["wifi"]
...
so maybe

Code:
            "params": {
                "type": "grid",
                "remote-service": "com.jolla.contacts.ui",
                "remote-path": "/com/jolla/contacts/ui",
                "remote-interface": "com.jolla.contacts.ui",
                "remote-method": "createContact",
                "remote-arguments": ["createContact"]
            }
works for you
 

The Following 4 Users Say Thank You to fooxl For This Useful Post:
Posts: 136 | Thanked: 263 times | Joined on Nov 2012 @ Germany
#4
Fiddling with
Code:
            "params": {
                "type": "grid",
                "requires-package": "jolla-contacts",
                "remote-service": "com.jolla.contacts.ui",
                "remote-path": "/",
                "remote-interface": "com.jolla.contacts.ui",
                "remote-method": "createContact"
            }
I found out when using a non-existent "remote-method" in one of the other shortcut entries

com.jolla.notes.json
com.jolla.clock.json
com.jolla.camera.json

the apps won't launch at all. But doing this in

com.jolla.contacts.json

the people app will always launch with its start screen.

So maybe there's something broken and the remote-method is not recognized by the people app.
__________________
OpenSSH Status Widget (N900)
Start / stop / kill / restart / autostart server - View server status - View server and client connections - Switch wifi pm automatically

Simpler Brightness Applet (N900) - A variation of the Simple Brightness Applet
Short tap to toggle "keep backlight on" - Long tap to open display settings
 

The Following 3 Users Say Thank You to rasmarc For This Useful Post:
Posts: 136 | Thanked: 263 times | Joined on Nov 2012 @ Germany
#5
Some progress:
Code:
dbus-send --type=method_call --dest=com.jolla.contacts.ui /com/jolla/contacts/ui com.jolla.contacts.ui.createContact string:""
This shows the "add contact" page when the people app is already open.
__________________
OpenSSH Status Widget (N900)
Start / stop / kill / restart / autostart server - View server status - View server and client connections - Switch wifi pm automatically

Simpler Brightness Applet (N900) - A variation of the Simple Brightness Applet
Short tap to toggle "keep backlight on" - Long tap to open display settings
 

The Following 4 Users Say Thank You to rasmarc For This Useful Post:
Posts: 136 | Thanked: 263 times | Joined on Nov 2012 @ Germany
#6
Yippie!

Code:
{
    "translation_catalog": "lipstick-jolla-home",
    "entries": [
        {
            "path": "system_settings/look_and_feel/topmenu/actions/add_a_contact",
            "title": "Create a contact",
            "translation_id": "settings_quickaction-la-add_a_contact",
            "title_short": "Contact",
            "translation_id_short": "settings_quickaction-la-add_a_contact_short",
            "type": "action",
            "icon": "image://theme/icon-m-file-vcard",
            "order": 58,
            "params": {
                "type": "grid",
                "requires-package": "jolla-contacts",
                "remote-service": "com.jolla.contacts.ui",
                "remote-path": "/com/jolla/contacts/ui",
                "remote-interface": "com.jolla.contacts.ui",
                "remote-method": "createContact",
                "remote-arguments": ["string:''"]
            }
        }
    ]
}

But I prefer a different icon: icon-m-people
__________________
OpenSSH Status Widget (N900)
Start / stop / kill / restart / autostart server - View server status - View server and client connections - Switch wifi pm automatically

Simpler Brightness Applet (N900) - A variation of the Simple Brightness Applet
Short tap to toggle "keep backlight on" - Long tap to open display settings
 

The Following 5 Users Say Thank You to rasmarc For This Useful Post:
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, España
#7
Originally Posted by fooxl View Post
If you take a look at
Code:
/usr/share/jolla-settings/entries/com.jolla.internet.json
it uses
Code:
...
"remote-arguments": ["wifi"]
...
so maybe

Code:
            "params": {
                "type": "grid",
                "remote-service": "com.jolla.contacts.ui",
                "remote-path": "/com/jolla/contacts/ui",
                "remote-interface": "com.jolla.contacts.ui",
                "remote-method": "createContact",
                "remote-arguments": ["createContact"]
            }
works for you
Thanks @fooxl - you're final code is correct and is indeed working. It seems I managed to work it out anyway, but had forgotten that I had actually posted asking for help.

Thanks @rasmarc for your efforts

Regards
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 

The Following 3 Users Say Thank You to Markkyboy For This Useful Post:
Posts: 136 | Thanked: 263 times | Joined on Nov 2012 @ Germany
#8
Ha, the solution was already there

But note that the remote-argument can be anything, even "".
Code:
            "params": {
                "type": "grid",
                "requires-package": "jolla-contacts",
                "remote-service": "com.jolla.contacts.ui",
                "remote-path": "/com/jolla/contacts/ui",
                "remote-interface": "com.jolla.contacts.ui",
                "remote-method": "createContact",
                "remote-arguments": [""]
            }
__________________
OpenSSH Status Widget (N900)
Start / stop / kill / restart / autostart server - View server status - View server and client connections - Switch wifi pm automatically

Simpler Brightness Applet (N900) - A variation of the Simple Brightness Applet
Short tap to toggle "keep backlight on" - Long tap to open display settings
 

The Following 4 Users Say Thank You to rasmarc For This Useful Post:
Posts: 136 | Thanked: 263 times | Joined on Nov 2012 @ Germany
#9
Markkyboy, will you upload the patch again?
__________________
OpenSSH Status Widget (N900)
Start / stop / kill / restart / autostart server - View server status - View server and client connections - Switch wifi pm automatically

Simpler Brightness Applet (N900) - A variation of the Simple Brightness Applet
Short tap to toggle "keep backlight on" - Long tap to open display settings
 

The Following User Says Thank You to rasmarc For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 12:53.