<aside> <img src="https://prod-files-secure.s3.us-west-2.amazonaws.com/08bcd78f-acea-4107-8e5c-cce45804142d/6991d7fc-7b1e-4f03-954f-686c4a855543/Bridgefy_Official_Icon_2021.png" alt="https://prod-files-secure.s3.us-west-2.amazonaws.com/08bcd78f-acea-4107-8e5c-cce45804142d/6991d7fc-7b1e-4f03-954f-686c4a855543/Bridgefy_Official_Icon_2021.png" width="40px" /> The Bridgefy Software Development Kit (SDK) is a state-of-the-art, plug-and-play package that will let people use your mobile app when they don’t have access to the Internet, by using Bluetooth mesh networks.

Integrate the Bridgefy SDK into your Android and iOS app to reach the 3.5 billion people that don’t always have access to an Internet connection, and watch engagement and revenue grow!

</aside>

GitHub

https://github.com/bridgefy/bridgefy-react-native

Bridgefy React Native SDK

Operation mode

All the connections are handled seamlessly by the SDK to create a mesh network. The size of this network depends on the number of devices connected and the environment as a variable factor, allowing you to join nodes in the same network or nodes in different networks.

Platform permissions

To utilize this SDK in a React Native application, you'll need to configure permissions for each individual platform (iOS and Android) first. You can read more about each platform's requirements below:

Installation

$ npm i bridgefy-react-native
# --- or ---
$ yarn install bridgefy-react-native

Usage

Initialization

The initialize method initializes the Bridgefy SDK with the given API key and propagation profile. We will configure event listeners later.

import { Bridgefy, BridgefyPropagationProfile } from 'bridgefy-react-native';

const bridgefy = new Bridgefy();

export default function App() {
  React.useEffect(() => {
    bridgefy
      .initialize(
          'your-api-key-here', // UUID - The license key registered on the Bridgefy developer site.
        false, // The logging priority for SDK operations.
      )
      .catch((error) => {
        console.error(error);
      });
  });

Once initialized, you can call start to begin using the SDK.

bridgefy.start(
  userId?, // UUID? (optional) - The ID used to identify the user in the Bridgefy network.If null is passed, the SDK will assign an autogenerated ID.
  propagationProfile, // PropagationProfile (optional, default: PropagationProfile.Standard) - A profile that defines a series of properties and rules for the propagation of messages.
);

Sending data