EddyVerbruggen / nativescript-local-notifications

:mailbox: NativeScript plugin to easily schedule local notifications
MIT License
162 stars 57 forks source link

TypeError: Cannot read property 'LifecycleCallbacks' of undefined #158

Closed JeffersonLPLima closed 5 years ago

JeffersonLPLima commented 5 years ago

I'm trying load the package on Nativescript-Javascript using var LocalNotifications = require("../nativescript-local-notifications"); but I got the following error...

TypeError: Cannot read property 'LifecycleCallbacks' of undefined
File: "<unknown>, line: 1, column: 265

StackTrace:
        Frame: function:'registerLifecycleEvents', file:'file:///data/data/org.nativescript.preview/files/app/nativescript-local-notifications/local-notifications.js', line: 8, column: 40
        Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/nativescript-local-notifications/local-notifications.js', line: 11, column: 9
        Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/nativescript-local-notifications/local-notifications.js', line: 16, column: 3
        Frame: function:'require', file:'', line: 1, column: 266
        Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/main/main-page.js', line: 7, column: 26
        Frame: function:'require', file:'', line: 1, column: 266
        Frame: function:'_loop_1', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/globals/globals.js', line: 49, column: 22
        Frame: function:'global.loadModule', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/globals/globals.js', line: 57, column: 23
        Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 67, column: 27
        Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 83, column: 29
        Frame: function:'FrameBase.navigate', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 119, column: 30
        Frame: function:'ActivityCallbacksImplementation.setActivityContent', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 928, column: 34
        Frame: function:'ActivityCallbacksImplementation.onCreate', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 768, column: 14
        Frame: function:'NativeScriptActivity.onCreate', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/ui/frame/activity.js', line: 20, column: 25

I already try using Playground and the "tns preview", but both give me this error above.

EddyVerbruggen commented 5 years ago

The Playground/preview app doesn't support this plugin.

jakevossen5 commented 5 years ago

I am getting this error when using tns deploy android, any ideas?

jakevossen5 commented 5 years ago

Running tns platform remove android;tns platform add android;tns build android fixed it.

jumpjack commented 2 years ago

What can I use in playground for android notifications?