EddyVerbruggen / nativescript-local-notifications

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

Issue with schedule function #66

Closed Lingfar closed 6 years ago

Lingfar commented 6 years ago

Hello,

I'm trying to use this plugin but I have a problem with the schedule function. I get the following error when I try do schedule any notification : JS: Error in LocalNotifications.schedule: TypeError: notificationManager.getNotificationChannel is not a function

I downloaded your demo app https://github.com/EddyVerbruggen/nativescript-local-notifications-demo and I still got the same error.

I'm using a Nexus 5X with Android 8.0.0.

ShawnPavel commented 6 years ago

I can confirm this issue on a Google Pixel 2 with Android 8.0.0.

gregersen79 commented 6 years ago

Had the same issue on Google Pixel 2 with Android 8. I found out I needed to update the Android SDK Platform to API 26, after that it worked.

AnthonySmith01 commented 6 years ago

Yeah I have a similar issue on Android 8.0.0, when trying to schedule a notification I get: "Error in LocalNotifications.schedule: TypeError: builder.setChannelId is not a function"

I'm running an up to date sdk as well.

nmandyam commented 6 years ago

It's baaack! I get this when I try LocalNotifications.schedule...:

TypeError: notificationManager.getNotificationChannel is not a function at file:///.../files/app/tns_modules/nativescript-local-notifications/local-notifications.js:105:57 at Object.LocalNotifications.schedule (file:///.../files/app/tns_modules/nativescript-local-notifications/local-notifications.js:25:10)

I replaced the include.gradle with the new code from here, but that's made no difference.

The plugin is current - "nativescript-local-notifications": "^2.0.2".

My device is a Motorola X4 with Android 8.0.0.

BTW, @EddyVerbruggen, when installed the plugin, the include.gradle did NOT have the current version (marked as merged above on 1 Dec 2017).

ghost commented 6 years ago

Did you find a solution for this issue? I am confronted with the same error message.

EddyVerbruggen commented 6 years ago

Beats me.. that method is supposed to be available in API level 26 and works fine on my Android 8 device (just tested it with the demo app).

nmandyam commented 6 years ago

I updated the platform to 3.4.2, following the experience of radu2501 here, but that's made no difference on my x4. Any thoughts?

stevegardnersa commented 6 years ago

I had this same problem and just went into Android Studio and made sure I had all the SDKs and Build-Tools updated and then it started working.