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

    Make it possible to set default app

    Scheduled Pinned Locked Moved OS
    9 Posts 4 Posters 886 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.
      • dizzyD Offline
        dizzy
        last edited by

        If not already possible the ability to set default app should be implemented.
        I encountered a problem with this when trying out Onion Surf. Onion Surf then became default app and the only way I could revert it was to uninstall Onion Surf.
        I think it should be pretty easy to implement that.
        But no hurryπŸ˜‰

        Pixel 3a XL - UT stable - Daily driver
        Pinephone - UT dev
        Pinephone Pro - Manjaro Plasma Mobile & Mobian Phosh

        arubislanderA 1 Reply Last reply Reply Quote 1
        • arubislanderA Offline
          arubislander @dizzy
          last edited by arubislander

          @dizzy said in Make it possible to set default app:

          I think it should be pretty easy to implement that.

          In which case PR's are welcome 🧐

          But seriously though. Implementing this is more work than you think, as the shell has no concept of 'default apps' at this time.

          πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
          Happily running Ubuntu Touch
          Google Pixel 3a (20.04 DEV)
          JingPad (24.04 preview)
          Meizu Pro 5 (16.04 DEV)

          dizzyD 1 Reply Last reply Reply Quote 0
          • dizzyD Offline
            dizzy @arubislander
            last edited by dizzy

            @arubislander I would if I could but I only know .NET.
            Well, when installing a second browser it where set to be the default app for web browsing, so the function for it seems to be there already. If that setting is saved in a sqlite database its just a matter of a simple CRUD operation, or actually only RU operation. A file might be even easier. Am I wrong?

            Pixel 3a XL - UT stable - Daily driver
            Pinephone - UT dev
            Pinephone Pro - Manjaro Plasma Mobile & Mobian Phosh

            AppLeeA 1 Reply Last reply Reply Quote 0
            • dizzyD Offline
              dizzy
              last edited by

              I should also say that I personally dont need this. But I think it should be implemented sooner or later. I guess its expected to work that way.

              Pixel 3a XL - UT stable - Daily driver
              Pinephone - UT dev
              Pinephone Pro - Manjaro Plasma Mobile & Mobian Phosh

              1 Reply Last reply Reply Quote 0
              • AppLeeA Offline
                AppLee @dizzy
                last edited by AppLee

                @dizzy said in Make it possible to set default app:

                Well, when installing a second browser it where set to be the default app for web browsing, so the function for it seems to be there already. If that setting is saved in a sqlite database its just a matter of a simple CRUD operation, or actually only RU operation. A file might be even easier. Am I wrong?

                So many assumptions πŸ˜‰
                Just kidding, but I think it was already discussed when Onion was made available that it being the "default" browser is an unexpected side effect.
                It just appears that the hook is set to the latest installed app IIRC.
                Edit: I found the thread: https://forums.ubports.com/topic/3997/links-from-webapps-are-opening-in-onion-browser-default-instead-of-morph

                Handling this side effect is not as easy as it seems. First it requires to understand what happens and work around it to add a new feature.
                Such feature need to be tested a lot as the initial design never intended for another browser to exist.
                So back to step 1 and create a design to accomodate multiple browsers.

                To explain further why the redesign is a necessary step, that's because patching a workaround is never a good idea.
                It increases complexity and therefore the risk of bugs/vulnerabilities/exploits.
                A redesign allows for a much simpler code, easier to test, maintain and review.

                Also patching frequently increase the binary size and resources usage, a redesign is always better as it can be optimized.

                This is why Windows or Android get worse and worse after each update (patch policy)...

                dizzyD 1 Reply Last reply Reply Quote 2
                • dizzyD Offline
                  dizzy @AppLee
                  last edited by

                  @applee said in Make it possible to set default app:

                  many assumptions

                  Oh, I see. Yes you are right, there where many assumptionsπŸ˜€. I guess this thread could be removed then, due to there already is another one. I should have searched better.
                  Thanks for your explaination and the link!

                  Pixel 3a XL - UT stable - Daily driver
                  Pinephone - UT dev
                  Pinephone Pro - Manjaro Plasma Mobile & Mobian Phosh

                  AppLeeA 1 Reply Last reply Reply Quote 0
                  • AppLeeA Offline
                    AppLee @dizzy
                    last edited by

                    @dizzy No problem to keep the thread.
                    Also it's not a problem to make assumptions and/or mistakes... that how we learn.

                    It was just me poking around, as I like to say when "one makes an assumption I assume they are wrong". That a kind of "never say never" kind of thing πŸ™‚

                    Cheers

                    IanI 1 Reply Last reply Reply Quote 1
                    • IanI Offline
                      Ian @AppLee
                      last edited by

                      @applee There is also the saying 'never assume anything, because it makes an ass of u and me.'πŸ€“

                      But seriously you are right to say we learn from our mistakes. I like this notion, it means that I am very clever πŸ˜‚πŸ˜›πŸ˜‚

                      AppLeeA 1 Reply Last reply Reply Quote 2
                      • AppLeeA Offline
                        AppLee @Ian
                        last edited by

                        @ian Didn't know this one, thank you I'll try to remember it. :beaming_face_with_smiling_eyes:

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                          OSZAR »