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-24256] Android: Add support for com.android.providers.media.documents in TitaniumBlob #8716

Merged
merged 1 commit into from Jan 10, 2017

Conversation

garymathews
Copy link
Contributor

@garymathews garymathews commented Dec 29, 2016

  • Support content://com.android.providers.media.documents URLs received from the gallery
TEST CASE
var w = Ti.UI.createWindow({backgroundColor : 'grey'}),
    b = Titanium.UI.createButton({
        title : 'OPEN GALLERY',
        top : '10dp'
    }),
    iv = Ti.UI.createImageView({
        top : '65dp',
        width : '95%'
    });

b.addEventListener('click', function(e) {
    Ti.Media.openPhotoGallery({
        mediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO],
        success : function(e) {
            iv.height = e.media.height * (iv.rect.width / e.media.width);
            iv.image = e.media;

            alert(e.media.file.name);
            alert(e.media.length);
        },
        error : function(e) {
            Ti.API.error(JSON.stringify(e));
        }
    });
});

w.add(b);
w.add(iv);

w.open();
NOTE: This may require <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

JIRA Ticket

@DFoxinator
Copy link

Is there any eta for when this will get merged? I'd like to try a CI build to test it out.

@maggieaxway
Copy link
Contributor

@DFoxinator Hi David I've reviewed this one and it didn't work on all situations. I'll discuss it with Gary and update you next week.

@DFoxinator
Copy link

@maggieaxway thanks, I appreciate the update and information. I look forward to seeing the solution you come up with.

@maggieaxway maggieaxway merged commit 6b1c6ed into tidev:master Jan 10, 2017
@hansemannn
Copy link
Collaborator

hansemannn commented Jan 10, 2017

@maggieaxway I didn't see any new commits between you saying something didn't work and the merge. So it did work in the end?

@maggieaxway
Copy link
Contributor

@hansemannn Yes it works it was my problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants