UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    How to force a link to open with a selected app?

    Scheduled Pinned Locked Moved Unsolved App Development
    8 Posts 3 Posters 192 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • CiberSheepC Online
      CiberSheep
      last edited by

      The issue:

      • I've set up some links to open by App1
      • Inside App1, I show a link
      • This link, when tapped, is opened by App1

      How do I force the link to be opened with Morph?

      I've seen this, but I couldn't make it work as

      Qt.openUrlExternally("appid://morph-broswer.ubports/morph-broswer/current-user-version" link)

      Is the ContentHub required?

      Another planet, another time, another universe!

      1 Reply Last reply Reply Quote 0
      • K Offline
        kugiigi
        last edited by

        I actually didn't know about this, interesting.
        I triee a bit and had success it some apps like the clock app.
        I also tried with Morph Qt6 and it worked. This is what I used appid://morph-browser-qt6.ubports/morph-browser/current-user-version
        I'm still unsure what's the format for the second section so maybe that's the key?
        Also, maybe it only works with click apps and not deb ones? I also can't make it to work on apps like messaging app.

        nbdynlN CiberSheepC 2 Replies Last reply Reply Quote 0
        • nbdynlN Offline
          nbdynl @kugiigi
          last edited by

          @kugiigi this might work to force webapps to use the newer browser right?

          K 1 Reply Last reply Reply Quote 0
          • K Offline
            kugiigi @nbdynl
            last edited by

            @nbdynl Not really. This is only for opening an app and not opening a URL.

            1 Reply Last reply Reply Quote 0
            • CiberSheepC Online
              CiberSheep @kugiigi
              last edited by

              @kugiigi I'm pretty sure it only works for clicks as it takes appID

              For the messaging app... I think you can use 'message://' 🙂
              You can see the hooks for the url-dispatcher in the system.

              $ lomiri-url-dispatcher-dump 
              video,"",/usr/share/lomiri-url-dispatcher/urls/mediaplayer-app.url-dispatcher
              audio,"",/usr/share/lomiri-url-dispatcher/urls/mediaplayer-app.url-dispatcher
              syncmonitorhelper,"",/usr/share/lomiri-url-dispatcher/urls/syncmonitorhelper.url-dispatcher
              evernote,"",/home/phablet/.cache/lomiri-url-dispatcher/urls/notes.ubports_reminders_1.0.1.url-dispatcher
              tel,"",/usr/share/lomiri-url-dispatcher/urls/dialer-app.url-dispatcher
              dialer,"",/usr/share/lomiri-url-dispatcher/urls/dialer-app.url-dispatcher
              addressbook,"",/usr/share/lomiri-url-dispatcher/urls/address-book-app.url-dispatcher
              message,"",/usr/share/lomiri-url-dispatcher/urls/messaging-app.url-dispatcher
              sms,"",/usr/share/lomiri-url-dispatcher/urls/messaging-app.url-dispatcher
              http,"",/usr/share/lomiri-url-dispatcher/urls/morph-browser.url-dispatcher
              https,"",/usr/share/lomiri-url-dispatcher/urls/morph-browser.url-dispatcher
              ...
              

              I think the apps should receive an url if it's indicated in the desktop file:
              Exec=morph-browser %u
              %u should be 1 link, %U a list of them

              Another planet, another time, another universe!

              CiberSheepC 1 Reply Last reply Reply Quote 0
              • CiberSheepC Online
                CiberSheep @CiberSheep
                last edited by

                Oh!
                Might be this?

                application:///morph-browser.desktop

                https://gitlab.com/ubports/development/core/lomiri-schemas/-/blob/main/data/schemas/com.lomiri.Shell.gschema.xml.in#L268

                Another planet, another time, another universe!

                CiberSheepC 1 Reply Last reply Reply Quote 1
                • CiberSheepC Online
                  CiberSheep @CiberSheep
                  last edited by

                  To investigate:
                  https://gitlab.com/ubports/development/core/lomiri-url-dispatcher/-/blob/main/tests/dispatcher-test.cc

                  ^__^

                  Another planet, another time, another universe!

                  CiberSheepC 1 Reply Last reply Reply Quote 0
                  • CiberSheepC Online
                    CiberSheep @CiberSheep
                    last edited by

                    Ah, no. I don't think it's possible to pass an url + the appid link. The idea is to open the app...

                    Another planet, another time, another universe!

                    1 Reply Last reply Reply Quote 0

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better 💗

                    Register Login
                    • First post
                      Last post