Closed minicatsCB closed 1 month ago
I had the same problems.
It seems the plugins has some trouble with the DEFAULT ICON and the app crashes because of that
You have to set de value of smallIcon to an icon that exists.
this is your example with added icon.
this.localNotifications.schedule({ text: 'Delayed ILocalNotification', trigger: {at: new Date(new Date().getTime() + 3600)}, led: 'FF0000', smallIcon : "res://mipmap-ldpi/ic_launcher.png", sound: null }
I had the same problems. It seems the plugins has some trouble with the DEFAULT ICON and the app crashes because of that You have to set de value of smallIcon to an icon that exists. this is your example with added icon.
this.localNotifications.schedule({ text: 'Delayed ILocalNotification', trigger: {at: new Date(new Date().getTime() + 3600)}, led: 'FF0000', smallIcon : "res://mipmap-ldpi/ic_launcher.png", sound: null }
Yes.
Your Environment
cordova -v
): 9.0.0 (cordova-lib@9.0.1)cordova platform ls
): android 8.0.0Expected Behavior
Actual Behavior
Steps to Reproduce
ionic start notif sidemenu --type=ionic-angular
.npm install -g ionic cordova
.npm install --save @ionic-native/local-notifications@4
.ionic cordova plugin add cordova-plugin-local-notification@0.8.4
. If I follow the official Ionic documentation, it installs the beta version 0.9.0-beta-2, but I don't want to use the beta in production, so I choose 0.8.4. (Anyway, with both versions the results are the same).src/app/app.module.ts
.... providers: [ StatusBar, SplashScreen, LocalNotifications, {provide: ErrorHandler, useClass: IonicErrorHandler} ] ...
src/pages/home/home.html
. I did this to have something that tells me if the notification has been scheduled.Context
I'm trying to use this plugin in a bigger project but I can't get it to work. I decided to create a simple Ionic app with minimal code to try to isolate the problem.
Debug logs
adb logcat *:E
I can see this error: