diff --git a/package-lock.json b/package-lock.json index 66642e987..44be797ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2123,6 +2123,21 @@ } } }, + "@ionic-native/badge": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@ionic-native/badge/-/badge-5.30.0.tgz", + "integrity": "sha512-9bz8AsdiJVAPEGGRLihoWWkikJf38xjCBgshBpgMxlXGmaDKMQQ2PHl8EeSlzjDCZy3POLbtAQnLTfYp+zqXEg==", + "requires": { + "@types/cordova": "^0.0.34" + }, + "dependencies": { + "@types/cordova": { + "version": "0.0.34", + "resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz", + "integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ=" + } + } + }, "@ionic-native/camera": { "version": "5.29.0", "resolved": "https://registry.npmjs.org/@ionic-native/camera/-/camera-5.29.0.tgz", diff --git a/package.json b/package.json index 6da455346..0309ed784 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "@angular/platform-browser": "~10.0.0", "@angular/platform-browser-dynamic": "~10.0.0", "@angular/router": "~10.0.0", + "@ionic-native/badge": "^5.30.0", "@ionic-native/camera": "^5.29.0", "@ionic-native/chooser": "^5.29.0", "@ionic-native/clipboard": "^5.28.0", diff --git a/src/core/features/emulator/emulator.module.ts b/src/core/features/emulator/emulator.module.ts index c43fa19ec..9322dd5b8 100644 --- a/src/core/features/emulator/emulator.module.ts +++ b/src/core/features/emulator/emulator.module.ts @@ -19,6 +19,7 @@ import { CoreEmulatorHelperProvider } from './services/emulator-helper'; import { CoreEmulatorComponentsModule } from './components/components.module'; // Ionic Native services. +import { Badge } from '@ionic-native/badge/ngx'; import { Camera } from '@ionic-native/camera/ngx'; import { Chooser } from '@ionic-native/chooser/ngx'; import { Clipboard } from '@ionic-native/clipboard/ngx'; @@ -72,6 +73,7 @@ import { ZipMock } from './services/zip'; CoreEmulatorComponentsModule, ], providers: [ + Badge, { provide: Camera, deps: [Platform], diff --git a/src/core/singletons/events.ts b/src/core/singletons/events.ts index 65b738a3a..122d0426a 100644 --- a/src/core/singletons/events.ts +++ b/src/core/singletons/events.ts @@ -69,6 +69,7 @@ export class CoreEvents { static readonly SITE_STORAGE_DELETED = 'site_storage_deleted'; static readonly FORM_ACTION = 'form_action'; static readonly ACTIVITY_DATA_SENT = 'activity_data_sent'; + static readonly DEVICE_REGISTERED_IN_MOODLE = 'device_registered_in_moodle'; protected static logger = CoreLogger.getInstance('CoreEvents'); protected static observables: { [eventName: string]: Subject } = {}; diff --git a/src/core/singletons/index.ts b/src/core/singletons/index.ts index bab681879..c9a96adce 100644 --- a/src/core/singletons/index.ts +++ b/src/core/singletons/index.ts @@ -25,6 +25,7 @@ import { ActionSheetController as ActionSheetControllerService, } from '@ionic/angular'; +import { Badge as BadgeService } from '@ionic-native/badge/ngx'; import { Camera as CameraService } from '@ionic-native/camera/ngx'; import { Chooser as ChooserService } from '@ionic-native/chooser/ngx'; import { Clipboard as ClipboardService } from '@ionic-native/clipboard/ngx'; @@ -111,6 +112,7 @@ export function makeSingleton(injectionToken: Type | Type