|
|
|
|
1
|
-// tslint:disable:no-console
|
|
|
2
|
import { NativeModules, NativeEventEmitter } from 'react-native';
|
1
|
import { NativeModules, NativeEventEmitter } from 'react-native';
|
3
|
import { EventSubscription } from '../interfaces/EventSubscription';
|
2
|
import { EventSubscription } from '../interfaces/EventSubscription';
|
4
|
|
3
|
|
|
|
|
|
8
|
try {
|
7
|
try {
|
9
|
this.emitter = new NativeEventEmitter(NativeModules.RNNEventEmitter);
|
8
|
this.emitter = new NativeEventEmitter(NativeModules.RNNEventEmitter);
|
10
|
} catch (e) {
|
9
|
} catch (e) {
|
11
|
- console.log('Using mock NativeEventEmitter module');
|
|
|
12
|
this.emitter = {
|
10
|
this.emitter = {
|
13
|
addListener: () => {
|
11
|
addListener: () => {
|
14
|
return {
|
12
|
return {
|