Class Bifrost

Set of methods available for eitri-apps

Hierarchy

  • Bifrost

Properties

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.

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.

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.

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.

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.

deeplink: Deeplink

Methods for deep link opening

clipboard: Clipboard

Methods for clipboard access

Methods for filesystem access, download and upload management

Methods for shared filesystem access, download and upload management

keyboard: Keyboard

Methods for keyboard access and manipulation

version: string

Current eitri-bifrost version

tracking: Tracking

Set of tools for tracking eitri-apps

Available tools:

  • Clarity
  • Google Analytics
  • Datadog
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.

share: Share

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

biometrics: Biometrics

Methods for using biometric authentication.

notification: Notification

Methods for managing device notifications.

environment: Environment

Methods with infos related to the current environment

system: System

Methods for accessing the system's information.

haptic: Haptic

Methods for interacting with haptic feedback on devices

geolocation: Geolocation

Methods for managing device geolocation.

bottomBar: BottomBar

Methods for interacting with bottom navigation bar

mediaNotification: MediaNotification

Methods for managing mediaNotification.

webFlow: WebFlow

Web interface that allows users to navigate through a complex web flow.

It can be used for corporate logins and other complex web flows involving multiple redirects in an OAuth flow.

appStore: AppStore

Methods for allowing the app to perform actions related to the device's application store

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

  • 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>

  • 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>

  • 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>

  • Checks if the device is online.

    Example:

    const isOnline = await Eitri.isOnline();
    

    Compatibility Control

    • API LEVEL 9 - Functionality added

    Returns Promise<boolean>

Generated using TypeDoc