MOBILE-2947 notification: Apply color to small icon

main
Dani Palou 2019-04-08 12:28:02 +02:00
parent 839fe09fa7
commit b2cf777bec
3 changed files with 6 additions and 2 deletions

View File

@ -70,5 +70,6 @@
"multisitesdisplay": "",
"skipssoconfirmation": false,
"forcedefaultlanguage": false,
"privacypolicy": "https:\/\/moodle.org\/mod\/page\/view.php?id=8148"
"privacypolicy": "https:\/\/moodle.org\/mod\/page\/view.php?id=8148",
"notificoncolor": "#f98012"
}

View File

@ -241,7 +241,8 @@ export class CorePushNotificationsProvider {
return {
android: {
sound: !!soundEnabled,
icon: 'smallicon'
icon: 'smallicon',
iconColor: CoreConfigConstants.notificoncolor
},
ios: {
alert: 'true',

View File

@ -25,6 +25,7 @@ import { CoreTextUtilsProvider } from './utils/text';
import { CoreUtilsProvider } from './utils/utils';
import { SQLiteDB, SQLiteDBTableSchema } from '@classes/sqlitedb';
import { CoreConstants } from '@core/constants';
import { CoreConfigConstants } from '../configconstants';
import { Subject, Subscription } from 'rxjs';
/*
@ -481,6 +482,7 @@ export class CoreLocalNotificationsProvider {
if (this.platform.is('android')) {
notification.icon = notification.icon || 'res://icon';
notification.smallIcon = notification.smallIcon || 'res://smallicon';
notification.color = notification.color || CoreConfigConstants.notificoncolor;
const led: any = notification.led || {};
notification.led = {