Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Quickactions now called Shortcuts

    Reply
    Markkyboy | # 1 | 2018-11-03, 10:53 | Report

    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,

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 7 Users Say Thank You to Markkyboy For This Useful Post:
    Amboss, fooxl, imaginaryenemy, juiceme, Macros, rasmarc, santeira

     
    fooxl | # 2 | 2018-11-06, 17:05 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by fooxl; 2018-11-06 at 17:34.
    The Following 4 Users Say Thank You to fooxl For This Useful Post:
    Amboss, imaginaryenemy, juiceme, rasmarc

     
    fooxl | # 3 | 2018-11-06, 22:40 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 4 Users Say Thank You to fooxl For This Useful Post:
    Amboss, juiceme, Markkyboy, rasmarc

     
    rasmarc | # 4 | 2019-01-29, 12:57 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 3 Users Say Thank You to rasmarc For This Useful Post:
    Amboss, juiceme, Markkyboy

     
    rasmarc | # 5 | 2019-01-29, 15:35 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 4 Users Say Thank You to rasmarc For This Useful Post:
    Amboss, juiceme, Markkyboy, olf

     
    rasmarc | # 6 | 2019-01-29, 15:54 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 5 Users Say Thank You to rasmarc For This Useful Post:
    Amboss, imaginaryenemy, juiceme, Markkyboy, olf

     
    Markkyboy | # 7 | 2019-01-29, 15:54 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 3 Users Say Thank You to Markkyboy For This Useful Post:
    Amboss, juiceme, rasmarc

     
    rasmarc | # 8 | 2019-01-29, 16:04 | Report

    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": [""]
                }

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 4 Users Say Thank You to rasmarc For This Useful Post:
    Amboss, imaginaryenemy, juiceme, olf

     
    rasmarc | # 9 | 2019-02-08, 16:50 | Report

    Markkyboy, will you upload the patch again?

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to rasmarc For This Useful Post:
    juiceme

     
vBulletin® Version 3.8.8
Normal Logout