ℹ️Device

πŸ§‹ Bubble.io Plugin

[Element] Natively - Device

Initialize:

  • Refresh App Info action will be called on element load, so you can access it asap.

Make sure to not add a lot of 'Natively - Device' elements because it will send a request to a device each time on load.

Events:

  • App Info received

  • App went foreground - User opened the app - available starting from v2.12.2

  • App went background - User minimized the app (closed without exiting) - available starting from v2.12.2

  • Keyboard is visible - User taps an input and keyboard appears - available starting from v. 2.17.0

  • Keyboard is hidden - User closes the keyboard - available starting from v. 2.17.0

  • Error occurred - Fires automatically when an HTTP request fails and the Set Error Handler action has been previously called on the current page. - available starting from v. 2.26.0

States:

  • Device - Device model (iOS can be decoded with this list)

  • OS Version - Android/iOS version

  • App Version

  • Build Number

  • Natively SDK Version

  • OS Name - "Android" / "iOS"

  • isDarkMode - Yes / No

  • Orientation - "PORTRAIT" / "LANDSCAPE"

  • Error Code: The HTTP status code of the failed request (e.g., 404, 500)

  • Error Description: A text description of the error provided by the requester endpoint

  • Error Response Data: The raw response body (JSON/Text) returned by the server for the failed HTTP request (if available)

Actions:

  • Refresh App Info

  • Set Error Handler - Enables the custom error handling mode for the current page session. When Active, the app will not automatically display the native Error Screen when an HTTP request fails. Instead, it will trigger the Error occurred event.

How to use the Error Handler

To ensure consistent error handling across your app, we recommend placing the logic in a Reusable Element (like your Header or a dedicated technical Reusable) that exists on every page.

  1. Place the Natively - Device element inside your Reusable Element

  2. When Natively - Device's Device state is not empty (this ensures the element is fully initialized) > call Set Error Handler action

  3. Create a workflow to handle the error when it happens (the event Error occurred is fired)

  4. The error's details can also be visible in the Debug console

πŸ›  JavaScript SDK

Device App Info

resp.device value for iOS can be decoded with this list

Need to recognize the app and the web users? Check this out: Browser Info

Last updated

Was this helpful?