Andrey Bondarenko 0289958a33 change
2021-02-16 22:43:02 +10:00
bug
2021-02-16 14:53:17 +10:00
2021-02-16 22:43:02 +10:00
2020-06-08 22:14:06 +03:00
2020-06-08 22:14:06 +03:00
2021-01-21 16:10:35 +10:00
2021-02-15 17:59:08 +10:00
2020-06-08 22:14:06 +03:00
2021-02-16 22:43:02 +10:00
2021-01-21 21:00:35 +10:00

react-native-appmetrica-next

React Native bridge to the AppMetrica on both iOS and Android. react-native-push-next library functionality is expanded react-native-appmetrica

Installation

npm install react-native-appmetrica-next --save or yearn add react-native-appmetrica-next

Usage

import AppMetrica from "react-native-appmetrica-next";

// Starts the statistics collection process.
AppMetrica.activate({
  apiKey: "...KEY...",
  sessionTimeout: 120,
  firstActivationAsUpdate: true,
});

// Sends a custom event message and additional parameters (optional).
AppMetrica.reportEvent("My event");
AppMetrica.reportEvent("My event", { foo: "bar" });

// Send a custom error event.
AppMetrica.reportError("My error");

// reportUserProfile
    AppMetrica.activate({
      apiKey: "...KEY...",
      sessionTimeout: 120,
      firstActivationAsUpdate: true,
    });
    RNAppMetrica.setUserProfileID('id');
    RNAppMetrica.reportUserProfile({
      name: 'Andrey Bondarenko',
      floor: 'male',
      age: 34,
      isNotification: true,
    });

// init Push SDK example for iOS
 checkPermission = async () => {
    const authorizationStatus = await messaging().requestPermission();

    if (authorizationStatus === messaging.AuthorizationStatus.AUTHORIZED) {
      const deviceToken = await messaging().getToken();

      RNAppMetrica.initPush(deviceToken); -> // for iOS
      // or
      RNAppMetrica.initPush(); -> // for Android

Description
No description provided
Readme 14 MiB
Languages
Java 35.1%
Objective-C 34.1%
JavaScript 19.6%
Ruby 9.6%
Starlark 1.6%