For the complete documentation index, see llms.txt. This page is also available as Markdown.

πŸŽ™οΈAudio Recorder

Let users record audio directly within your app using the native audio recorder.

What is Audio Recorder?

The Audio Recorder feature gives your app access to the device's native audio recording interface, letting users record audio without leaving the app. The recording is returned as a Base64-encoded string, which you can play back or upload to your server.

Audio Recorder requests microphone permission on both iOS and Android. Users will be prompted to grant this permission the first time the feature is used.

Prerequisites

Audio Recorder uses the Microphone feature, which is enabled by default for all new apps. If the Microphone has been disabled for your app, you'll need to re-enable it for Audio Recorder to work.

Implementation

Choose your integration method below: Bubble.io Plugin (No-Code), JavaScript SDK (Code), or AI Agents (for AI-powered editors like Lovable, Base44, and Replit).

Initialization

Check Plugin

Before starting, verify if the Natively plugin is already installed in your Bubble project.

  1. Open your Bubble editor and navigate to the Plugins tab in the left sidebar.

  2. Check Installed Plugins: Look through your list of installed plugins for "Natively iOS & Android app builder".

    • If it IS installed: Check the version number. If an update is available (e.g., you see a button saying "Update"), click it to ensure you have the latest features and bug fixes.

  • If it is NOT installed: Click the + Add plugins button, search for "Natively", and click Install.

Setup Logic

[Element] Natively - Audio Recorder

Events:

  • Recorder Result Updated - called after the recording finishes.

  • Recorder Cancelled - called when the user closes the recorder without recording.

  • File Uploaded - called after the file is successfully uploaded to S3 (the file URL is available in the element's state).

  • File Size over limit - triggered when the recorded file exceeds the File Size Limit parameter.

States:

  • Recorder Result (Base64) - Base64 string representation of the recorded audio, for custom uploading.

  • Recorder Result (Content Type) - audio/m4a (iOS) or audio/wav (Android).

  • Uploaded File URL - Amazon S3 file URL (only populated if upload is enabled).

  • File Size - size of the latest recording result, in KB.

Actions:

  • Show Recorder

    • Upload File - checkbox; uploads the recording to Amazon S3.

    • File Name - used if Upload File is checked.

    • File Size Limit - in KB; prevents uploading files larger than this limit to Bubble's Amazon S3.

    • Max Duration - maximum recording duration in seconds. Leave at 0 for unlimited duration.

How to use

Check resp.status before processing the recording

A cancelled recording still triggers the callback - always confirm resp.status === "SUCCESS" before uploading or storing resp.base64.

Set a max_duration for predictable file sizes

Long recordings produce large Base64 payloads. Cap recording length if your backend has upload size limits - for example, 60 seconds for a voice memo, or a few minutes for a longer note.

Convert content type before playback if needed

iOS returns audio/m4a and Android returns audio/wav. If you play recordings back across platforms, confirm your player or backend handles both formats.

Troubleshooting

Audio Recorder doesn't do anything in a web browser

This is a native feature and won't function in Safari, Chrome, or any browser preview - test it in a real build installed on a device.

Recording fails, or the user is never prompted for microphone access

Check whether the Microphone feature is enabled in the Natively Dashboard. If the user previously denied microphone access, direct them to Open App Settings to re-enable it.

Last updated