Skip to content

Device API

Block description
Block rendering
Block example
Retrieves an object containing a custom configuration. The configuration can be set up by navigating to UI Builder -> Settings -> Custom Settings. It can contain any custom data.
codeless_ui_library_device_api_get_custom_app_settings
codeless_ui_library_device_api_example_get_custom_app_settings
Displays a dialog containing a message. The dialog remains active until the user closes it.
The message property expects a string value.
Note that the dialog boxes are modal windows that prevent the user from accessing the interface of your application till they are closed.
codeless_ui_library_device_api_show_alert
codeless_ui_library_device_api_example_show_alert
Scrolls to the requested component to make it visible to the user.
You must use the Get component by id Codeless block to pass the ID of the desired component to the component property.
codeless_ui_library_device_api_scroll_to
codeless_ui_library_device_api_example_scroll_to
Focuses on the component that receives the keyboard or similar events.
The application will scroll to the component, making it visible to the user, and activate it by enabling the input cursor or by highlighting the focus area.
You must use the Get component by id Codeless block to pass the ID of the desired component to the component property.
codeless_ui_library_device_api_focus_on_component
codeless_ui_library_device_api_example_focus_on
Retrieves the Width or Height of the application window in pixels.
Returns a number value.
codeless_ui_library_device_api_get_app_width_height
codeless_ui_library_device_api_example_get_app_width_height
Retrieves the Width or Height of the requested component in pixels.
You must use the Get component by id Codeless block to pass the ID of the desired component to the component property.
Returns a number value.
codeless_ui_library_device_api_get_width_height_of_component
codeless_ui_library_device_api_example_get_component_width_height
Returns the location of the Window as an object containing the current URL.
codeless_ui_library_device_api_get_window_location
codeless_ui_library_device_api_example_get_window_location
Identifies the browser platform and retrieves the user agent string.
codeless_ui_library_device_api_get_userAgent_string
codeless_ui_library_device_api_example_get_useragent_string
Retrieves the language code, usually representing a default system language selected by the user.
codeless_ui_library_device_api_get_client_locale
codeless_ui_library_device_api_example_get_client_locale
Returns a URL of the current page.
codeless_ui_library_device_api_get_current_url
codeless_ui_library_device_api_example_get_current_url
Returns an object containing the current GEO location of the device.
A user must grant permissions to retrieve their location. If the user rejects granting permissions, then this block throws an exception.
If the application is running in the Backendless Native Shell, it retrieves the GEO data from the native device. If it is running in a web browser or in the Backendless Viewer it gets data using the browser API.
codeless_ui_library_device_api_get_current_geo_location
codeless_ui_library_device_api_example_get_current_geo_location