Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-27201

Android: Update "Ti.Filesystem.File" to support exists(), extension(), and read() when wrapping "content://" URL

    Details

    • Type: Improvement
    • Status: Open
    • Priority: None
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Android

      Description

      Summary:
      When passing an Android "content://" URL to the Ti.Filesystem.getFile() method, the returned File object does not support the following methods. They will return failure results and log a "Method is not supported" warning.

      We should add the above methods for consistency.

      Note:
      The File object already correctly implements all other methods and properties for a "content://" URL such as the copy() method and "nativePath" property. Adding the above methods will help make the interface more complete and avoid confusion.

      Implementation:
      We need to add the above methods to our TitaniumBlob Java class.
      https://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/io/TitaniumBlob.java

      We can test the inclusion of these methods with the attached FileContentUrlTest.js file. This test script assumes its was created via a Classic Default project template.

        Attachments

          Activity

            People

            • Assignee:
              jquick Joshua Quick
              Reporter:
              jquick Joshua Quick
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Source Code