emma-react-native-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.6.0 • Public • Published

EMMA React Native SDK

Minimal Setup

Use EMMA SDK to register and gather information about installations, sessions, communications, and many other events.

Add it to your project

yarn add emma-react-native-sdk

or

npm install emma-react-native-sdk

Use it from your React Native application

import React, { Component } from 'react';
import EmmaSdk from 'emma-react-native-sdk';

EmmaSdk.startSession(
  {
    sessionKey: 'EXAMPLE_EMMA_SESSION_KEY',
    isDebug: false, // Optional, default: false
    queueTime: 10, // Optional, default: 10
    customPowlinkDomains: ['example.com'], // Optional, default: []
    customShortPowlinkDomains: ['ex.co'], // Optional, default: []
    trackScreenEvents: true, // Optional, default: false
  },
  () => {
    console.log('Got it!');
  },
  (error) => {
    console.error('Oh, oh!', error);
  }
);

Read the example application source code for further information and useful tips. Also, TypeScript types will guide you through the implementation, with SDK's methods and their params.

Example

Read, build and try EmmaReactNativeExample application. It covers the main interactions with EMMA SDK.

For example, to launch the iOS version:

cd EmmaReactNativeExample
npm run cache:clear
npm install
cd ios
pod install
cd ..
npm run ios

Refer to the React Native documentation for further information.

Relevant Notes

  • Session has to be started before any other method is called.
  • Banner communication format is only supported on Android devices.

Documentation and further information

Use EMMA SDK everywhere

Native

Cross-platform

Package Sidebar

Install

npm i emma-react-native-sdk

Homepage

emma.io

Weekly Downloads

51

Version

1.6.0

License

Apache-2.0

Unpacked Size

134 kB

Total Files

47

Last publish

Collaborators

  • jaumecornado
  • acarreraemma