-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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-24707] Android: Show images and videos in picker #9223
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fmerzadyan, you need to add support for the "mediaType" array argument here...
http://docs.appcelerator.com/platform/latest/#!/api/PhotoGalleryOptionsType-property-mediaTypes
If this array only contains MEDIA_TYPE_PHOTO
or MEDIA_TYPE_LIVE_PHOTO
, then the type string should be "image/*"
.
If this array only contains MEDIA_TYPE_VIDEO
, then the type should be "video/*"
.
If the array contains both photo and video types, then it should be set to "*/*"
.
4dcba7b
to
6d26314
Compare
Generated by 🚫 dangerJS |
…y() video support. - Modified returned blob's "mimeType" property to no longer return null. Now provides selected file's mime type. - Added constant Ti.Media.MEDIA_TYPE_LIVEPHOTO, even though it's not supported on Android. (Avoids JavaScript runtime errors.) - Fixed returned blob to not crash when attempting to access it's "file" property if not accessible on the file system. (Will be null in this case instead.) - When "allowMultiple" is true, success result's event dictionary now provides a "videos" property. (Pairs with "images" property.) - Fixed bug with blobs that wrap "content://" URIs to not crash when fetching file size. (Now fetches size from Android ContentProvider.) - Updated docs to indicate that Android now supports "mediaTypes" property.
Updated PR:
|
@jquick-axway @garymathews Can you resolve the conflicts? |
FR Passed. Images , videos or both are properly shown in the picker according to the Studio Ver: 5.1.0.201804230827 |
@jquick-axway , Jenkins is complaining about no tests. Can you please take a look. |
JIRA: https://jira.appcelerator.org/browse/TIMOB-24707
Summary:
Added
MEDIA_TYPE_VIDEO
support toTi.Media.openPhotoGallery()
on Android. Can now select both images and videos with this API, like iOS.(Does not support live photos. That is an iOS only feature.)
Test 1:
Re-run test attached to PR #9918.
Test 2:
Re-run test attached to PR #9906.
Verify that selecting an image from Google Drive (via the cloud) does not cause a crash.
Test 3:
Re-run test attached to PR #9771.
Verify that the screenshot taken via
toImage()
can still be viewed viapreviewImage()
.Test 4:
(You need to take photos and videos using the Android device's camera before starting the below test procedure.)