()
| 10 | const platform = gd.JsPlatform.get(); |
| 11 | |
| 12 | const declareFakeAdmod = () => { |
| 13 | const extension = new gd.PlatformExtension(); |
| 14 | extension |
| 15 | .setExtensionInformation( |
| 16 | 'AdMob', |
| 17 | 'AdMob', |
| 18 | 'Some fake extension mimicking the AdMob extension', |
| 19 | 'Florian Rival', |
| 20 | 'MIT' |
| 21 | ) |
| 22 | .setExtensionHelpPath('/all-features/admob'); |
| 23 | |
| 24 | extension |
| 25 | .registerProperty('AdMobAppIdAndroid') |
| 26 | .setLabel('AdMob Android App ID') |
| 27 | .setDescription('ca-app-pub-XXXXXXXXXXXXXXXX~YYYYYYYYYY') |
| 28 | .setType('string'); |
| 29 | |
| 30 | extension |
| 31 | .registerProperty('AdMobAppIdIos') |
| 32 | .setLabel('AdMob iOS App ID') |
| 33 | .setDescription('ca-app-pub-XXXXXXXXXXXXXXXX~YYYYYYYYYY') |
| 34 | .setType('string'); |
| 35 | |
| 36 | extension |
| 37 | .addDependency() |
| 38 | .setName('AdMob Cordova plugin') |
| 39 | .setDependencyType('cordova') |
| 40 | .setExportName('gdevelop-cordova-admob-plus') |
| 41 | .setVersion('0.43.0') |
| 42 | .setExtraSetting( |
| 43 | 'APP_ID_ANDROID', |
| 44 | new gd.PropertyDescriptor('AdMobAppIdAndroid').setType( |
| 45 | 'ExtensionProperty' |
| 46 | ) |
| 47 | ) |
| 48 | .setExtraSetting( |
| 49 | 'APP_ID_IOS', |
| 50 | new gd.PropertyDescriptor('AdMobAppIdIos').setType( |
| 51 | 'ExtensionProperty' |
| 52 | ) |
| 53 | ) |
| 54 | .onlyIfSomeExtraSettingsNonEmpty(); |
| 55 | |
| 56 | extension |
| 57 | .addAction( |
| 58 | 'ShowInterstitial', |
| 59 | 'Show interstitial', |
| 60 | 'Fake action that would show an interstitial screen.', |
| 61 | 'Show the loaded interstitial', |
| 62 | 'AdMob', |
| 63 | 'JsPlatform/Extensions/admobicon24.png', |
| 64 | 'JsPlatform/Extensions/admobicon16.png' |
| 65 | ) |
| 66 | .getCodeExtraInformation() |
| 67 | .setIncludeFile('Extensions/FakeAdMob/admobtools.js') |
| 68 | .setFunctionName('gdjs.fakeAdMob.showInterstitial'); |
| 69 |
no test coverage detected