question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[🌟] Support `launchCamera` with mediaType `mixed` on iOS

See original GitHub issue

Description

iOS has a native UI for capturing any type of camera media in one place - e.g this is the interface that apps like iMessage open when selecting the image capture option. It looks like this:

Screenshot:

IMG_78DCFA04F55B-1

However, react-native-image-picker only supports photo or video options to launchCamera, which limit the UI to only one media type. This looks like this:

Screenshot:

IMG_65BAF03FE32F-1

It would be great to support the full “any media type” UI here. It looks like this was discussed and addressed for launchImageLibrary in https://github.com/react-native-image-picker/react-native-image-picker/issues/1527, but not for launchCamera

Proposed Solution

launchCamera({ mediaType: "mixed" }) should open the mixed media capture UI. Currently, calling this function is equivalent to passing mediaType: "photo"

Test Solution

See screenshots above

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:9
  • Comments:9

github_iconTop GitHub Comments

1reaction
hungdevcommented, Nov 5, 2021

+1

0reactions
abdoerrahiemcommented, Oct 26, 2022

any updates? I need this feature in my current app

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to show videos and images with react-native-image ...
Looks like you have to specify mediaType={mixed} for iOS and you'll have to specify whether you want to see video or images for...
Read more >
How to use the react-native-image-picker.launchCamera ...
To help you get started, we've selected a few react-native-image-picker.launchCamera examples, based on popular ways it is used in public projects.
Read more >
Microsoft Lens for iOS
Microsoft Lens is an app for your iOS device that lets you easily capture, use, and share information from documents, whiteboards, photos, ...
Read more >
An In-Depth Guide to Using React Native Image Picker
In this tutorial, let us start with the basics of how to integrate this module for both iOS and Android platforms in a...
Read more >
react-native-image-picker - Let's see how to take a photo and ...
Option Required Type iOS Android title X string ○ ○ cancelButtonTitle X string ○ ○ takePhotoButtonTitle X string ○ ○
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found