Initial JS implementation
This commit is contained in:
parent
41598e0b38
commit
6e9449cb3d
22
index.js
Normal file
22
index.js
Normal file
@ -0,0 +1,22 @@
|
||||
import { NativeModules } from 'react-native';
|
||||
const { AppMetrica } = NativeModules;
|
||||
|
||||
export default {
|
||||
|
||||
/**
|
||||
* Starts the statistics collection process.
|
||||
* @param {string} apiKey
|
||||
*/
|
||||
activateWithApiKey(apiKey) {
|
||||
AppMetrica.activateWithApiKey(apiKey);
|
||||
},
|
||||
|
||||
/**
|
||||
* Sends a custom event message and additional parameters (optional).
|
||||
* @param {string} message
|
||||
* @param {object} [params=null]
|
||||
*/
|
||||
reportEvent(message, params = null) {
|
||||
AppMetrica.reportEvent(message, params);
|
||||
},
|
||||
};
|
Loading…
Reference in New Issue
Block a user