import { MobileMessaging } from '@awesome-cordova-plugins/mobile-messaging/ngx';
constructor(private mobileMessaging: MobileMessaging) { }
...
this.mobileMessaging.init({
applicationCode: '<your_application_code>',
geofencingEnabled: '<true/false>',
defaultMessageStorage: '<true/false>',
ios: {
notificationTypes: ['alert', 'badge', 'sound']
},
android: {
notificationIcon: <String; a resource name for a status bar icon (without extension), located in '/platforms/android/app/src/main/res/mipmap'>,
multipleNotifications: <Boolean; set to 'true' to enable multiple notifications>,
notificationAccentColor: <String; set to hex color value in format '#RRGGBB' or '#AARRGGBB'>
}}, (err) => {
...
});
this.mobileMessaging.register('messageReceived').subscribe((message: Message) => {
...
});