Class Bifrost

Set of methods available for eitri-apps

Hierarchy

  • Bifrost

Properties

biometrics: Biometrics

Methods for using biometric authentication.

bottomBar: BottomBar

Methods for interacting with bottom navigation bar

clipboard: Clipboard

Methods for clipboard access

deeplink: Deeplink

Methods for deep link opening

environment: Environment

Methods with infos related to the current environment

eventBus: EventBus

Tools for listening to events on your eitri-app coming from the main app.

You can also use this bus to implement a pub/sub pattern inside your app.

Methods for filesystem access, download and upload management

geolocation: Geolocation

Methods for managing device geolocation.

haptic: Haptic

Methods for interacting with haptic feedback on devices

http: Http

Set of methods for handling HTTP requests

In an eitri-app, it's important to note that it's only possible to make HTTP requests through these commands. The format is similar to a well-known library called axios.

keyboard: Keyboard

Methods for keyboard access and manipulation

nativeNavigation: NativeNavigation

Interaction with the native navigation of the device.

Restricted usage: Only available with app owner authorization.

This type of navigation can cause increased memory consumption but can handle complex scenarios where the state of the current eitri-app needs to be preserved in memory while another eitri-app is running in the foreground.

navigation: Navigation

Set of methods for navigating between screens. Each set of files (jsx and js) in the view folder generates a screen. It's possible to navigate through these screens using the methods described here.

notification: Notification

Methods for managing device notifications.

share: Share

Methods for sharing content using the device's share sheet.

Methods for shared filesystem access, download and upload management

sharedStorage: SharedStorage

Set of methods to operate data storage shared between eitri-apps.

To use SharedStorage and make data available between two or more Eitri-Apps, an AppGroup is required.

AppGroups are a concept that permits some resources to be shared, such as storage. When two or more Eitri-Apps are in the same AppGroup, they can write data in one Eitri-App and retrieve it in another Eitri-App.

To set up an AppGroup configuration, please contact Eitri support.

storage: Storage

Set of methods for operating data storage in eitri-apps

Notes:

Storage data is not shared between different eitri-apps. Data is transported as a string and transformed with parsing. Pay attention to the size of the data passed to avoid affecting the experience.

system: System

Methods for accessing the system's information.

tracking: Tracking

Set of tools for tracking eitri-apps

Available tools:

  • Clarity
  • Google Analytics
  • Datadog
version: string

Current eitri-bifrost version

Accessors

  • get exposedApis(): any
  • Returns the exposed APIs of the app, granting privileged access that is not commonly available to eitri-apps.

    Eitri-apps operate within a sandboxed environment, and this function allows the host (app) to provide features and functionality that extend eitri-apps base capabilities.

    Example:

    const result = await Eitri.exposedApis.math.sum({a: 1, b: 2});
    

    Compatibility Control

    • API LEVEL 1 - Functionality added

    Returns any

Methods

  • Checks if the desired API level is compatible with the API_LEVEL used in the eitri-machine

    Check compatibility control concept

    • API LEVEL 1 - Functionality added

    Parameters

    • apiLevelCandidate: number

      apiLevel to validate

    Returns boolean

  • Closes the current eitri-app.

    Example:

    Eitri.close()
    

    Compatibility Control

    • API LEVEL 1 - Functionality added

    Returns Promise<void>

  • Fetches configurations specific to the current eitri-app.

    Example:

    const appConfig = await Eitri.getConfigs()
    

    Compatibility Control

    • API LEVEL 1 - Functionality added

    Returns Promise<AppConfigs>

  • Returns the data received during the initialization of the eitri-app.

    Example:

    const startParams = await Eitri.getInitializationInfos()
    

    Compatibility Control

    • API LEVEL 1 - Functionality added

    Returns Promise<Object>

  • Checks if the device is online.

    Example:

    const isOnline = await Eitri.isOnline();
    

    Compatibility Control

    • API LEVEL 9 - Functionality added

    Returns Promise<boolean>

  • Opens an HTTPS address in the system's default browser.

    Example:

    await Eitri.openBrowser({url: "https://calindra.tech"});
    

    Compatibility Control

    • API LEVEL 1 - Functionality added
    • API LEVEL 11 - Parameter inApp

    Parameters

    Returns Promise<void>

Generated using TypeDoc