Uploaded image for project: 'Nuxeo Mobile'
  1. Nuxeo Mobile
  2. NXMOB-249

Android: don't use DownloadManager when downloading a file to send it to another app

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Android 1.2
    • Component/s: Android
    • Tags:
    • Sprint:
      nxfit 9.1.2, nxfit 9.1.3
    • Story Points:
      8

      Description

      When trying to use react-native-fetch-blob without the Android DownloadManager to download the file and send it to another app with react-native-share we get an error when the app tries to open the file:

      01-02 17:07:50.224 20288 20463 E null    : Job failed during startPartialUpload: FilePartialUploadJob{id=eec840d2-ab36-420f-84c2-9220bac5adef, team_id=T02B0FD05, channel_ids=[], title=null, comment=null, filename=Mont_Aiguille.jpg, mime_type=image/jpeg, file_content=null, uri=file:///data/user/0/com.nuxeomobile/files/share/581338c7-9a5c-40bb-a1a2-e68a0ae00052/Mont_Aiguille.jpg, error=null, ticket=null, file_id=null, job_state=STARTED, confirm_state=UNCONFIRMED}
      01-02 17:07:50.224 20288 20463 E null    : java.lang.IllegalArgumentException: java.io.FileNotFoundException: Permission denied
      01-02 17:07:50.224 20288 20463 E null    : 	at com.Slack.persistence.fileupload.FilePartialUploadJob.getFileDescriptor(FilePartialUploadJob.java:213)
      01-02 17:07:50.224 20288 20463 E null    : 	at com.Slack.persistence.fileupload.FilePartialUploadJob.getFileInputStream(FilePartialUploadJob.java:178)
      

      As a workaround we are currently using the DownloadManager.

      Let's try to understand the error and fix it to follow the iOS behavior.

      -----------------------------------------

      This is related to permission issues and linked to NXMOB-237.
      Now we are no more going through the DownloadManager to:

      • Send a file to another application, see NXMOB-209.
      • Open a file that cannot be previewed, typically a PDF file, see NXMOB-205.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: