Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-117417

Regression 5.15: Sharing Files w FileProvider fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.7.3, 6.8.0 RC, 6.9.0 FF
    • 6.6.0 Beta2
    • Extras: Android
    • None
    • Android 13, API 33
    • Android
    • d3508d48c (dev), a96e0eddd (6.8), ce284c7fd (6.7)
    • 2024wk16FOQtforAndroid, 2024wk20s2FOQtforAndroid, 2024wk24s2FOQtforAndroid, 2024wk26s2FOQtforAndroid, 2024wk28s2FOQtforAndroid, 2024wk30s2FOQtforAndroid, 2024wk32s2FOQtforAndroid, 2024wk34s2FOQtforAndroid

    Description

      With Qt 6.6 QDesktopServices is supported using qtprovider (FileProvider).

      This works great !

      In some Apps I'm already using a custom FileProvider to share Files with other Apps. This worked well in 5.15.

      Now in 6.6 I have both FileProviders in Android Manifest:

      • android:authorities="${applicationId}.qtprovider"
      • android:authorities="org.ekkescorner.examples.sharex.fileprovider"

      and also metadata in XML Resource with different FilePaths:

      • for qtprovider I changed file path from "/" to: "my_special_files/" to avoid any overlapping pathes
      • my custom FileProvider uses file path "share_example_x_files/".

      QDesktopServices works well for files inside "my_special_files/".

      Trying to share Files lists Android Chooser with valid target Apps for VIEW, EDIT or SEND. But when I'm selecting an App - per ex. Google Files, my provided File cannot be displayed, because of an error:

      The authority org.ekkescorner.examples.sharex.fileprovider does not match the one of the contentProvider: org.ekkescorner.examples.sharex.qtprovider
      at android.content.ContentProvider.validateIncomingAuthority(ContentProvider.java:2568)
      at android.content.ContentProvider.validateIncomingUri(ContentProvider.java:2583)
      at android.content.ContentProvider$Transport.query(ContentProvider.java:244)
      at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:107)
      at android.os.Binder.execTransactInternal(Binder.java:1280)
      at android.os.Binder.execTransact(Binder.java:1244)

      I disabled the qtprovider in Manifest - then sharing works as before, but then of course QDesktopServices isn't working. I would prefer to be able to use both: File Sharing and QDesktopServices

      Have described the issue in more detail: https://t1p.de/ekkeCustomFileProvider

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              ahmedelkhazari Ahmed El Khazari
              ekkescorner Ekkehard
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes