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. Data Sharing with apps from Qt app on android
Forum Updated to NodeBB v4.3 + New Features

Data Sharing with apps from Qt app on android

Scheduled Pinned Locked Moved Solved Mobile and Embedded
11 Posts 3 Posters 1.4k 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.
  • ahsan737A ahsan737

    Greetings,

    This blog was created for android 6.0, explaining the data sharing with other apps on android, and by then, android has been upgraded to v11.0. I've implemented this code in the Qt android app, and it works quite well till android 8, but on android versions 10 and 11, it doesn't read all the apps installed on the system to share data with. Would you please guide which changes are required to make it work with v11?

    Best Regards,
    Ahsan

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #2

    @ahsan737 said in Data Sharing with apps from Qt app on android:

    This blog was created for android 6.0

    Which blog do you mean?

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    ahsan737A 1 Reply Last reply
    0
    • jsulmJ jsulm

      @ahsan737 said in Data Sharing with apps from Qt app on android:

      This blog was created for android 6.0

      Which blog do you mean?

      ahsan737A Offline
      ahsan737A Offline
      ahsan737
      wrote on last edited by ahsan737
      #3

      @jsulm I've added the blog link in the original post.

      for reference: https://www.qt.io/blog/2017/12/01/sharing-files-android-ios-qt-app#comments

      ekkescornerE 1 Reply Last reply
      0
      • ahsan737A ahsan737

        @jsulm I've added the blog link in the original post.

        for reference: https://www.qt.io/blog/2017/12/01/sharing-files-android-ios-qt-app#comments

        ekkescornerE Offline
        ekkescornerE Offline
        ekkescorner
        Qt Champions 2016
        wrote on last edited by
        #4

        @ahsan737 just last week I've updated https://github.com/ekke/ekkesSHAREexample to Qt 5.15
        you should give it a test - I have no problems on Android 9 and 10

        ekke ... Qt Champion 2016 | 2024 ... mobile business apps
        5.15 --> 6.8 https://t1p.de/ekkeChecklist
        QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

        ahsan737A 1 Reply Last reply
        3
        • ekkescornerE ekkescorner

          @ahsan737 just last week I've updated https://github.com/ekke/ekkesSHAREexample to Qt 5.15
          you should give it a test - I have no problems on Android 9 and 10

          ahsan737A Offline
          ahsan737A Offline
          ahsan737
          wrote on last edited by
          #5

          @ekkescorner thank you very much. I will give it a try.

          1 Reply Last reply
          0
          • ahsan737A Offline
            ahsan737A Offline
            ahsan737
            wrote on last edited by
            #6

            I have tried with updated code.

            I can share the data with some apps, but it cannot read all compatible apps for data sharing such as Wechat, Whatsapp, etc.

            Testing OS: Android 11 (Oneplus 8T)
            Target SDK: API 28 Android 9

            Please check the attached files for reference.
            shareData.jpg DeviceConfig.jpg compileKit.jpg

            ekkescornerE 1 Reply Last reply
            0
            • ahsan737A ahsan737

              I have tried with updated code.

              I can share the data with some apps, but it cannot read all compatible apps for data sharing such as Wechat, Whatsapp, etc.

              Testing OS: Android 11 (Oneplus 8T)
              Target SDK: API 28 Android 9

              Please check the attached files for reference.
              shareData.jpg DeviceConfig.jpg compileKit.jpg

              ekkescornerE Offline
              ekkescornerE Offline
              ekkescorner
              Qt Champions 2016
              wrote on last edited by
              #7

              @ahsan737 my app is only an example how you can implement sharing.
              you have to figure out how the missed apps share their data, which intent-filter you need per ex. - sorry, have not the time to figure this out yet.

              ekke ... Qt Champion 2016 | 2024 ... mobile business apps
              5.15 --> 6.8 https://t1p.de/ekkeChecklist
              QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

              ahsan737A 1 Reply Last reply
              0
              • ekkescornerE ekkescorner

                @ahsan737 my app is only an example how you can implement sharing.
                you have to figure out how the missed apps share their data, which intent-filter you need per ex. - sorry, have not the time to figure this out yet.

                ahsan737A Offline
                ahsan737A Offline
                ahsan737
                wrote on last edited by ahsan737
                #8

                @ekkescorner okay sir, thanks for the kind response.

                PS: Actually, I do not have much experience with android app development, so I cannot dive deep into the issue.

                ekkescornerE 1 Reply Last reply
                0
                • ahsan737A ahsan737

                  @ekkescorner okay sir, thanks for the kind response.

                  PS: Actually, I do not have much experience with android app development, so I cannot dive deep into the issue.

                  ekkescornerE Offline
                  ekkescornerE Offline
                  ekkescorner
                  Qt Champions 2016
                  wrote on last edited by
                  #9

                  @ahsan737 for one customer per ex. I had to add

                              <intent-filter>
                                  <action android:name="android.intent.action.SEND_MULTIPLE"></action>
                                  <category android:name="android.intent.category.DEFAULT"></category>
                                  <data android:mimeType="*/*"></data>
                              </intent-filter>
                  

                  ekke ... Qt Champion 2016 | 2024 ... mobile business apps
                  5.15 --> 6.8 https://t1p.de/ekkeChecklist
                  QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

                  ahsan737A 1 Reply Last reply
                  1
                  • ekkescornerE ekkescorner

                    @ahsan737 for one customer per ex. I had to add

                                <intent-filter>
                                    <action android:name="android.intent.action.SEND_MULTIPLE"></action>
                                    <category android:name="android.intent.category.DEFAULT"></category>
                                    <data android:mimeType="*/*"></data>
                                </intent-filter>
                    
                    ahsan737A Offline
                    ahsan737A Offline
                    ahsan737
                    wrote on last edited by
                    #10

                    @ekkescorner thank you

                    ahsan737A 1 Reply Last reply
                    0
                    • ahsan737A ahsan737

                      @ekkescorner thank you

                      ahsan737A Offline
                      ahsan737A Offline
                      ahsan737
                      wrote on last edited by
                      #11

                      @ahsan737

                      replacing the following line of code
                      return createCustomChooserAndStartActivity(sendIntent, title, requestId, uri);

                      with these lines has worked for me.
                      QtNative.activity().startActivity(Intent.createChooser(sendIntent, null));
                      return true;

                      Thanks to Dorian

                      1 Reply Last reply
                      0
                      • ahsan737A ahsan737 has marked this topic as solved on

                      • Login

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