βΉοΈBrowser Info
Detect whether your app is running on iOS, Android, or a web browser, and monitor the device's network connectivity.
What is Browser Info?
Browser Info gives your app access to two types of information: the environment it's running in, and the device's current network status. You can use it to detect whether the user is inside a Natively iOS app, a Natively Android app, or a regular web browser - and conditionally show or hide features based on that. You can also listen for connectivity changes to handle offline states gracefully.
Prerequisites
This feature is available in all plans. See all plans
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.
Open your Bubble editor and navigate to the Plugins tab in the left sidebar.
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.

Check SDK
Before writing any logic, ensure the Natively SDK is correctly installed and up-to-date in your codebase.
Open your project's main HTML file (or header settings) and look for the Natively script tag inside the
<head>section.Install/Update: If missing or outdated, add the following code. You can specify the SDK version in the URL (e.g.,
@2.26.0).
To ensure you are using the most up-to-date version, check the Natively GitHub releases page for the latest version number.
Initialize the SDK
AI-powered editors like Lovable, Base44, and Replit use the JavaScript SDK to implement Natively features. Before implementing any feature, the Natively SDK must be initialized in your project.
Copy the line below and paste it into your AI agent to check and set up the Natively SDK in your project.
Setup Logic
[Element] Natively - Browser
Events:
Device went offline - fires when the device loses internet connectivity.
Device back online - fires when the device regains internet connectivity.
States:
isAndroidApp - Yes / No.
isIOSApp - Yes / No.
isNativeApp - Yes / No.
Connectivity - Yes / No (Device is online or offline).
AI-powered editors like Lovable, Base44, and Replit use the JavaScript SDK to implement Natively features.
Copy the line below and paste it into your AI agent.
Replace the placeholder at the beginning with a description of what you want to build - for example: "Show the Sign in with Apple button only when the app is running on iOS, and hide it on Android and web browsers".
How to use
Conditional feature visibility
The most common use case is showing or hiding features based on the platform. Use browserInfo.isIOSApp and browserInfo.isAndroidApp to conditionally render platform-specific elements - for example, showing the Sign in with Apple button only on iOS, or displaying an Android-specific payment method only on Android.
Detecting the web context
If browserInfo.isNativeApp is false, the user is accessing your app from a regular web browser, not a Natively app. You can use this to show a prompt encouraging them to download the mobile app, or to disable features that only work in a native context.
Handling offline states
Use window.ononline and window.onoffline to respond to connectivity changes in real time. Common use cases include showing an offline banner, disabling form submissions when offline, or queuing actions to retry once the connection is restored.
Call browserInfo early
Since info.browserInfo() returns synchronously without a callback, call it as early as possible in your app's initialization - ideally right after the Natively SDK loads in nativelyOnLoad(). This ensures platform detection is available before any conditional rendering happens.
Troubleshooting
browserInfo values are all false in a web browser
This is expected behavior - isIOSApp, isAndroidApp, and isNativeApp are all false when the app is accessed from a regular web browser. Design your logic to handle this case gracefully.
Last updated