Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25846] TiAPI: Add method "hidePhotoGallery()" to hide photo-gallery manually,

GitHub Issuen/a
TypeNew Feature
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid, iOS, Windows
Labelsn/a
Reportersonufana4u
AssigneeKota Iguchi
Created2018-03-07T09:36:04.000+0000
Updated2018-06-21T17:18:55.000+0000

Description

Add a method hidePhotoGallery() like hideCamera() or hideMusicLibrary() for iOS to close gallery manually.In some scenario it requires.

Comments

  1. Rene Pot 2018-03-07

    Hi [~sonufana4u], do you have links for the native documentation on iOS & Android?
  2. Hans Knöchel 2018-03-07

    On iOS, it is technically possible to hide the photo-gallery (aka UIImagePickerController). If the same is possible on Android and Windows, we could consider adding an API for that. Only doing it on iOS would be a bad parity decision, as we need to move forward achieving API's for all platforms. For now, you can use Hyperloop to hide the top most controller as well (using the key-window), something like:
       var TiApp = require('Titanium/TiApp');
       var topPresentedController = TiApp.getController().presentingViewController;
       topPresentedController.dismissViewControllerAnimatedCompletion(true, function(e) {
         Ti.API.info('Photo Gallery was dismissed successfully!');
       });
       
    *EDIT*: Good news! As the camera uses the same underlaying API, you can also use Ti.Media.hideCamera() for closing the photo gallery on iOS! But we should still expose it as an own API in the future to prevent possible confusion.
  3. sonufana4u 2018-03-08

    @hans @rene - Thanks a lot for considering this.I'll try above suggestion.(y)

JSON Source