Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-19910] Android: openPhotoGallery fails when remote image selected #7911

Merged
merged 1 commit into from Apr 14, 2016

Conversation

ashcoding
Copy link
Contributor

JIRA: https://jira.appcelerator.org/browse/TIMOB-19910

To test, the Android device must be using the app "Google Photos" and you need photos that are in the cloud and not in the device. Run the code and select the photo that is in the cloud when testing.

Test code:

var win = Ti.UI.createWindow({
    backgroundColor : 'black',
    layout : 'vertical'
});

function selectPhoto(){
  Titanium.Media.openPhotoGallery({   
    success:function(e){
        console.log(e.media);
        var image = Ti.UI.createImageView({
          image: e.media
        });
        win.add(image);
    },
    allowEditing:true,
    mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO]
  });
};

var button = Titanium.UI.createButton({
   title: 'Hello',
   top: 10,
   width: 100,
   height: 50
});
button.addEventListener('click',function(e)
{
   selectPhoto();
});
win.add(button);

win.open(); 

@ashcoding
Copy link
Contributor Author

@hieupham007 please review this when you are able to.

@ashcoding ashcoding assigned ashcoding and hieupham007 and unassigned ashcoding Apr 14, 2016
@hieupham007
Copy link
Contributor

Code reviewed and functionally tested. Request accepted

@hieupham007 hieupham007 merged commit ce2fa62 into tidev:master Apr 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants