Closed Mflm closed 6 years ago
Maybe because I use also Nativescript-firebase
because in a new project the plugins works great
TypeError: Cannot read property 'class' of undefined JS: at file:///data/data/xxx/files/app/tns_modules/nativescript-local-notifications/local-notifications.js:132:121 I don't have firebase.
tns platform remove android
tns platform add android
fixed it.
I guess 50% of issues related to plugins can be resolved that way. I wonder how to report that kind of bug...
Yes
Thank you
I have this error:
Cannot read property 'class' of undefined I'm only call the function when the page loads:
exports.pageLoaded = function(args) { exports.doScheduleEveryMinute();
exports.doScheduleEveryMinute = function () { LocalNotifications.schedule([{ id: 1, class:'0', title: 'The title', body: 'The big body. The big body. The big body. The big body. The big body. The big body. The big body. The big body.', bigTextStyle: true, // Adds an 'expansion arrow' to the notification (Android only) sound: "customsound", channel: "My Awesome Channel", ticker: 'Special ticker text (Android only)', at: new Date(new Date().getTime() + (10 * 1000)) // 10 seconds from now }]).then( function() { console.log("Notification scheduled"); }, function(error) { console.log("scheduling error: " + error); } ) };
Thanks