How to use the React Native Bridge in JavaScript
Objective
To provide a React Native App Developer with details on how to use the React Native Bridge to enable communication between React Native and the Bubbl Plugin.
Audience
React Native App Developer
import { NativeModules } from 'react-native';
module.exports = NativeModules.BubblSdk;
Replace <YOUR API KEY>
in the following code with your company's Bubbl API Key.
...
import BubblSdk from './BubblSdk';
...
if (Platform.OS === 'android') {
BubblSdk.initialize('https://mobilegateway.bubbl.tech/api/','<YOUR API KEY>');
} else {
NativeModules.BubblSdk.saveActivatedPayloadTitle('Messages');
NativeModules.BubblSdk.initialize('https://mobilegateway.bubbl.tech/api','<YOUR API KEY>');
}
Updated almost 2 years ago