Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. off-topic a little bit - Mobile app deep linking
Forum Updated to NodeBB v4.3 + New Features

off-topic a little bit - Mobile app deep linking

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 2 Posters 565 Views 2 Watching
  • 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.
  • M Offline
    M Offline
    Marek
    wrote on last edited by
    #1

    Hi all
    Has anyone tried https://en.wikipedia.org/wiki/Mobile_deep_linking with Qt app ?
    For instancje on Android URI like:
    myapp://showItem/33138223345
    On Android should I add Java class to extend QtActivity, to get this intent in onCreate ?
    Is there some way to make it work on iOS ?

    Best Regards
    Marek

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      If memory serves well, you should implement a custom intent for Androïd and a custom URL scheme on iOS.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        If memory serves well, you should implement a custom intent for Androïd and a custom URL scheme on iOS.

        M Offline
        M Offline
        Marek
        wrote on last edited by
        #3

        @SGaist
        Hi
        On Android developer pages https://developer.android.com/training/app-links/deep-linking#java they say about Intent catched early on in onCreate. So maybe I should extend QtActivity ?

        public class MyActivity extends QtActivity {
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
        
            Intent intent = getIntent();
            String action = intent.getAction();
            Uri data = intent.getData();
        }
        }
        

        And update AndroidManifest about main activity as MyActivity ?
        If so, then I could pass somehow this "Uri data" to my application

        But how about iOS, I mean there is an explanation for Custom URL scheme here for example
        https://coderwall.com/p/mtjaeq/ios-custom-url-scheme
        But how to catch on Qt side these parameters passed to app in custom URL like this:
        myapp://?foo=1&bar=2
        How could I read them in Qt app ?

        Best Regards
        Marek

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          If I remember correctly, you need to create a custom URL handler and set it through QDesktopService.

          For Androïd, yes, you have to extend QtActivity.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          M 1 Reply Last reply
          0
          • SGaistS SGaist

            If I remember correctly, you need to create a custom URL handler and set it through QDesktopService.

            For Androïd, yes, you have to extend QtActivity.

            M Offline
            M Offline
            Marek
            wrote on last edited by
            #5

            @SGaist Thanks, I will try
            Best,
            Marek

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved