1 | import { UnavailabilityError } from '@unimodules/core';
|
2 |
|
3 | import ExpoAdsAdMob from './ExpoAdsAdMob';
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | export async function isAvailableAsync(): Promise<boolean> {
|
11 | return !!ExpoAdsAdMob.setTestDeviceIDAsync;
|
12 | }
|
13 |
|
14 | export async function setTestDeviceIDAsync(testDeviceID: string | null): Promise<void> {
|
15 | if (!ExpoAdsAdMob.setTestDeviceIDAsync) {
|
16 | throw new UnavailabilityError('expo-ads-admob', 'setTestDeviceIDAsync');
|
17 | }
|
18 | await ExpoAdsAdMob.setTestDeviceIDAsync(testDeviceID || '');
|
19 | }
|