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

Android: openPhotoGallery - width and height = 0 in 7.1.0 RC

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 7.1.0, Release 7.0.2
    • Fix Version/s: Release 7.1.0
    • Component/s: Android
    • Environment:

      SDK 7.1.0.v20180307160628
      Android

    • Sprint:
      2018 Sprint 05 SDK

      Description

      After choosing a photo from the gallery, e.media.width and e.media.height are set to 0 in the success callback. Theses values were available in 7.0.2 and before.

      var win = Ti.UI.createWindow();
       
      var button = Ti.UI.createButton({
          title: "open gallery",        
      });
       
      button.addEventListener("click", function(){
          Ti.Media.openPhotoGallery({
              mediaTypes: [Titanium.Media.MEDIA_TYPE_PHOTO],
              success: function(e) {
                  var msg = "media.width: " + e.media.width
                      + "\nmedia.height: " + e.media.height
                      + "\nmedia.length: " + e.media.length
                      + "\nmedia.mimeType: " + e.media.mimeType
                      + "\nmedia.nativePath: " + e.media.nativePath;
                  alert(msg);
              },
              error: function(e) {
                  alert('Error opening image: ' + e.error);
              }
          });
      });
      win.add(button);
      win.open();
      

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              gaspard.le Luc-Edmond Gaspard
              Reviewer:
              Joshua Quick
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-6236
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code