1 | import { UnavailabilityError } from '@unimodules/core';
|
2 | import ExpoAdsAdMob from './ExpoAdsAdMob';
|
3 | /**
|
4 | * Returns whether the AdMob API is enabled on the current device. This does not check the native configuration.
|
5 | *
|
6 | * @returns Async `boolean`, indicating whether the AdMob API is available on the current device. Currently this resolves `true` on iOS and Android only.
|
7 | */
|
8 | export async function isAvailableAsync() {
|
9 | return !!ExpoAdsAdMob.setTestDeviceIDAsync;
|
10 | }
|
11 | export async function setTestDeviceIDAsync(testDeviceID) {
|
12 | if (!ExpoAdsAdMob.setTestDeviceIDAsync) {
|
13 | throw new UnavailabilityError('expo-ads-admob', 'setTestDeviceIDAsync');
|
14 | }
|
15 | await ExpoAdsAdMob.setTestDeviceIDAsync(testDeviceID || '');
|
16 | }
|
17 | //# sourceMappingURL=AdMob.js.map |
\ | No newline at end of file |