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

Windows: ShowCamera should not write image to photoGallery by default

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: Release 6.1.0, Release 6.1.1
    • Fix Version/s: Release 6.2.0
    • Component/s: Windows
    • Labels:
    • Environment:

      Ti SDK: 6.1.1.v20170619143158, 6.1.0.GA
      Appc Core: 6.2.2
      Appc NPM: 4.2.9
      Lumia 550 10.0
      10.0 ws-local

    • Story Points:
      3
    • Sprint:
      2017 Sprint 17 SDK

      Description

      Description

      Currently when using Ti.Media.showCamera, the photo will be saved to the users photo gallery by default, regardless of the saveToPhotoGallery setting. By default the file should not be saved to the photo gallery

      var win = Ti.UI.createWindow({ backgroundColor: 'green', layout: 'vertical' }),
          openButton = Ti.UI.createButton({ title: 'OPEN CAMERA', backgroundColor: 'blue', top: 25 });
      openButton.addEventListener('click', function () {
          Ti.Media.showCamera({
              success: function (e) {
                  var img = Ti.UI.createImageView({
                      image: e.media
                  });
                  win.add(img);
              },
              error: function (e) {
                  alert('showCamera() error: ' + JSON.stringify(e));
              }
          });
      });
      win.add(openButton);
      win.open();
      

      Steps to reproduce
      1. Add the code above to an existing app.js
      2. Build for Windows
      3. Tap the show camera button and take a photo
      4. Add the following to your tiapp under the windows section

        <manifest>
            <Capabilities>
                <uap:Capability Name="picturesLibrary" />
                <uap:Capability Name="videosLibrary" />
            </Capabilities>
        </manifest>
        

        5. Rebuild and repeat the steps

      Actual

      Without the capabilities, after taking the photo the app will throw an access denied in the alert.

      With the capabilities a photo will be added to the window, and to the devices photo gallery

      Expected

      A photo should be added in both cases, neither should add the photo to the photo gallery

        Attachments

          Activity

            People

            • Assignee:
              kiguchi Kota Iguchi
              Reporter:
              eharris Ewan Harris
              Reviewer:
              Gary Mathews
              Tester:
              Ewan Harris
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code