Problem is getting square blank image in notification.
I have installed Local Notifications plugin
ionic plugin add de.appplant.cordova.plugin.local-notification
I have tried
- saved image in platforms\android\res\drawable\sample.png
Here is code
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import {LocalNotifications} from 'ionic-native';
@Component({
templateUrl: 'build/pages/home/home.html'
})
export class HomePage {
constructor(public navCtrl: NavController) {
LocalNotifications.schedule({
id: 1,
title: 'Title here',
text: 'Text <b>here aaa</b>',
led: "FF0000",
icon: "sample"
});
}
}
- saved image in \www\img\sample.png
Here is code
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import {LocalNotifications} from 'ionic-native';
@Component({
templateUrl: 'build/pages/home/home.html'
})
export class HomePage {
constructor(public navCtrl: NavController) {
LocalNotifications.schedule({
id: 1,
title: 'Delay Notification',
at: new Date(new Date().getTime() + 3600),
text: 'Text <b>here aaa</b>',
led: "FF0000",
icon: "file://android_asset/www/img/sample.png"
});
}
}