Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
multiApp: false,
hasShards: false,
namespace: NAMESPACE,
});
SharedEventEmitter.addListener(
// sub to internal native event - this fans out to
// public event name: onMessage
'links_link_received',
({ link }) => {
SharedEventEmitter.emit('onLink', link);
}
);
// Tell the native module that we're ready to receive events
if (Platform.OS === 'ios') {
getNativeModule(this).jsInitialised();
}
}
results: notificationOpen.results,
});
}
);
SharedEventEmitter.addListener(
// sub to internal native event - this fans out to
// public event name: onNotification
'notifications_notification_received',
(notification: NativeNotification) => {
SharedEventEmitter.emit('onNotification', new Notification(notification));
}
);
// Tell the native module that we're ready to receive events
if (Platform.OS === 'ios') {
getNativeModule(this).jsInitialised();
}
}
// because resolveAssetSource depends on it
if (!MANAGED_ENV) {
const { uri } = resolveAssetSource(virtualAssetModule);
const asset = new Asset({
name: meta.name,
type: meta.type,
hash: meta.hash,
uri,
width: meta.width,
height: meta.height,
});
// TODO: FileSystem should probably support 'downloading' from drawable resources
// But for now it doesn't and React Native's Image works fine with drawable resource
// names for images.
if (Platform.OS === 'android' && !uri.includes(':') && (meta.width || meta.height)) {
asset.localUri = asset.uri;
asset.downloaded = true;
}
Asset.byHash[meta.hash] = asset;
return asset;
}
return Asset.fromMetadata(meta);
}
// @flow
import { Platform } from 'react-native';
import { NativeModulesProxy, EventEmitter } from 'expo-core';
const MediaLibrary = NativeModulesProxy.ExponentMediaLibrary;
const eventEmitter = new EventEmitter(MediaLibrary);
type MediaTypeValue = 'audio' | 'photo' | 'video' | 'unknown';
type SortByKey =
| 'default'
| 'id'
| 'mediaType'
| 'width'
| 'height'
| 'creationTime'
| 'modificationTime'
| 'duration';
type SortByValue = [SortByKey, boolean] | SortByKey;
type MediaTypeObject = {
audio: 'audio',
photo: 'photo',
// @flow
'use strict';
import { NativeModulesProxy, EventEmitter } from 'expo-core';
import { Platform } from 'react-native';
import type { EmitterSubscription } from 'react-native';
const AdMobInterstitialManager: Object = NativeModulesProxy.ExpoAdsAdMobInterstitialManager;
const adMobInterstitialEmitter = new EventEmitter(AdMobInterstitialManager);
const eventNames = [
'interstitialDidLoad',
'interstitialDidFailToLoad',
'interstitialDidOpen',
'interstitialDidClose',
'interstitialWillLeaveApplication',
];
type EventNameType =
| 'interstitialDidLoad'
| 'interstitialDidFailToLoad'
| 'interstitialDidOpen'
| 'interstitialDidClose'
| 'interstitialWillLeaveApplication';
// @flow
import invariant from 'invariant';
import { NativeModulesProxy, EventEmitter } from 'expo-core';
import { Platform } from 'react-native';
const { ExpoLocation: Location } = NativeModulesProxy;
const LocationEventEmitter = new EventEmitter(Location);
type ProviderStatus = {
locationServicesEnabled: boolean,
gpsAvailable: ?boolean,
networkAvailable: ?boolean,
passiveAvailable: ?boolean,
};
type LocationOptions = {
enableHighAccuracy?: boolean,
timeInterval?: number,
distanceInterval?: number,
};
type LocationTaskOptions = {
type: string,
// @flow
'use strict';
import { NativeModulesProxy, EventEmitter } from 'expo-core';
import { Platform } from 'react-native';
const AdMobRewardedVideoAdManager: Object = NativeModulesProxy.ExpoAdsAdMobRewardedVideoAdManager;
const adMobRewardedEventEmitter = new EventEmitter(AdMobRewardedVideoAdManager);
const eventNames = [
'rewardedVideoDidRewardUser',
'rewardedVideoDidLoad',
'rewardedVideoDidFailToLoad',
'rewardedVideoDidOpen',
'rewardedVideoDidStart',
'rewardedVideoDidClose',
'rewardedVideoWillLeaveApplication',
];
type EventNameType =
| 'rewardedVideoDidRewardUser'
| 'rewardedVideoDidLoad'
| 'rewardedVideoDidFailToLoad'
| 'rewardedVideoDidOpen'
// @flow
'use strict';
import { NativeModulesProxy, EventEmitter } from 'expo-core';
import { Platform } from 'react-native';
import type { EmitterSubscription } from 'react-native';
const AdMobInterstitialManager: Object = NativeModulesProxy.ExpoAdsAdMobInterstitialManager;
const adMobInterstitialEmitter = new EventEmitter(AdMobInterstitialManager);
const eventNames = [
'interstitialDidLoad',
'interstitialDidFailToLoad',
'interstitialDidOpen',
'interstitialDidClose',
'interstitialWillLeaveApplication',
];
type EventNameType =
| 'interstitialDidLoad'
| 'interstitialDidFailToLoad'
| 'interstitialDidOpen'
| 'interstitialDidClose'
// @flow
'use strict';
import { NativeModulesProxy, EventEmitter } from 'expo-core';
import { Platform } from 'react-native';
const AdMobRewardedVideoAdManager: Object = NativeModulesProxy.ExpoAdsAdMobRewardedVideoAdManager;
const adMobRewardedEventEmitter = new EventEmitter(AdMobRewardedVideoAdManager);
const eventNames = [
'rewardedVideoDidRewardUser',
'rewardedVideoDidLoad',
'rewardedVideoDidFailToLoad',
'rewardedVideoDidOpen',
'rewardedVideoDidStart',
'rewardedVideoDidClose',
'rewardedVideoWillLeaveApplication',
];
type EventNameType =
| 'rewardedVideoDidRewardUser'
| 'rewardedVideoDidLoad'
// @flow
import { NativeModulesProxy, EventEmitter } from 'expo-core';
import UUID from 'uuid-js';
const FS = NativeModulesProxy.ExponentFileSystem;
const normalizeEndingSlash = p => p.replace(/\/*$/, '') + '/';
FS.documentDirectory = normalizeEndingSlash(FS.documentDirectory);
FS.cacheDirectory = normalizeEndingSlash(FS.cacheDirectory);
export const documentDirectory = FS.documentDirectory;
export const cacheDirectory = FS.cacheDirectory;
export const bundledAssets = FS.bundledAssets;
export const bundleDirectory = FS.bundleDirectory;
export const EncodingTypes = {
UTF8: "utf8",
Base64: "base64",
}
type FileInfo =