Camera/photo library

Page actionsIn this section, we’ll explore how you can seamlessly integrate your app with a mobile device’s camera and/or photo library. Whether you want users to take pictures in real time, or select existing images from their library, Bubble’s native mobile app editor makes this functionality accessible through simple action steps.

On-device permissions: When your app needs to access the device’s camera or photo library, the device may ask users for permission to grant access. Bubble handles these permission requests automatically, so you don’t need to worry about managing them manually.

Camera access

To access the camera, you can set up an event, like a button or icon click, and then add the "Open camera" action to the workflow. Bubble will manage the connection with the device's hardware, seamlessly displaying the camera app to the user.If you want to protect the captured photo with privacy rules, be sure to check the Make this file private box.

Save to camera library

To instruct the device to save a copy of the image to the camera library, check the Save to camera library box.

Making the file private

To make the uploaded file (i.e. protected by privacy rules), check the Make this file private box and select the data type to which the file should be attached.

Saving the result

The file will be uploaded in the same way that an uploaded file would, and you can store or use the URL of that file in a subsequent action by using the Result of step X data source.

Camera library access

To access the camera library, you can set up an event, such as a button or icon click, and then add the Open camera library action to the workflow. Bubble will handle the interaction with the device, displaying the built-in photo library to the user.

The file will be uploaded similarly to any other uploaded file.

Uploading multiple images

You can choose to upload a single image, or a list of images by using the Type dropdown in the action's settings:

  • Single photo: uploads one file and returns a single URL.

  • Multiple photos: uploads multiple files and returns a list of URLs.

Making the file private

To make the uploaded file (i.e. protected by privacy rules), check the Make this file private box and select the data type to which the file should be attached.

Saving the result

To save the result from a file uploaded from the camera library, please see the instructions above.

Last updated