Closed gbonline closed 6 years ago
Can you please check if the Android app linked on this page works for you? After installation open the menu and load "Feedback" (the link at the top), then try the Local Notifications plugin at the bottom.
Hi,
I followed the link and downloaded the app, but on my dev machine I can't build the project,
I have done atns platform add android
and then tns run android
the error is
What went wrong:
A problem occurred configuring project ':app'.
> All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com/r/tools/flavorDimensions-missing-error-message.html
So I download the app from android store and installed on my phone with oreo 8.1: result it work well. I don't know why I can't build the app, but today I have updated the android Studio and his gradle. Could this be the cause?
On my dev machine I have Nativescript 3.4.2, and I tried your simplest app named "nativescript-local-notification-demo" and I can build it, and on AVD device with android API 25 it run, but on AVD API 27 it show the error as on my first message.
Till now I have tested my projects with an AVD API 25,
What do you think I need to do? Should I update the Nativescript?
thanks for your plugins
Giorgio
Hi, I have some updates: I left my app with nativescript 3.4.2, and i'm not sure why, but I no longer have the error I reported at the beginning of the issue. I rebuilt some times the app which now works without errors: the notification appears on the phone. I still have some inconvenience with the schedule time, but I think is for the timezone difference
I had this same problem (demo app as well) and just went into Android Studio and made sure I had all the SDKs and Build-Tools updated and then it started working.
@stevegardnersa Could you please explain your fix somewhat? For me, this issue exists very clearly. I've updated Play Services, etc. via SDK Manager to no effect. Adding the channelId as the second parameter (as suggested here) causes an error about two parameters not bring supported (as, I guess, expected). So what specifically did you look for/do to fix this? I'm on TNS V 4.0.2.
Hi @nmandyam. Sorry for the slow reply. To be honest I'm not sure what exactly did it in the end but if I remember correctly it was something to do with my Android setup. Sorry I can't be of more help.
Hi, I'm trying to use this plugin on a little project. It work well on a device with API 25, but on device with API 27/Android 8.1 it fail to initialize the schedule with the following error message
> Error in LocalNotifications.schedule: TypeError: notificationManager.getNotificationChannel is not a function