Apologies for the dramatic title but am having lots of frustrations around ionic and local notifications. I had built an app using ionic 2 which was using local notifications. I have upgraded to ionic3 and have tried everything but cannot get local notifications to work.
The latest version of local notifications do not support ionic so I have to use an earlier version 0.8.4 or 0.8.5. But trying to install these versions throws errors. I have tried everything including starting a clean ionic3 project and installing the local notifications. (for eg I tried following this http://masteringionic.com/blog/2018-01-09-adding-local-notifications-to-an-ionic-framework-mobile-app/)
Nothing is working. Not sure how we are meant to use Ionic as a production framework without having local notifications??
Has anyone got this working or got any advice?
Thanks
Update: Lately even just trying to install the local notification is failing
Failed to install 'de.appplant.cordova.plugin.local-notification': CordovaError: Failed to fetch plugin cordova-plugin-app-event via registry
Update: I have made a little progress. I played around some more and decided to look at another older ionic project i have that uses local notifications. it was using a specific version of local notifications so I went and installed that specific version.
npm install @ionic-native/local-notifications@3.12.1
After doing that I could run ionic build and it completed without failures!! Good news!. Bad news - when I run ionic serve it launches the app but with a white screen and a console error of: I get an error that says
polyfills.js:3 Unhandled Promise rejection: No provider for LocalNotifications! ; Zone: ; Task: Promise.then ; Value: Error: No provider for LocalNotifications!
Even though i HAVE added it to my list of providers in my app module.
When I try run an android build I get the error below. I am officially out of ideas. Any help???
FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lorg/apache/cordova/BuildHelper; BUILD FAILED Total time: 29.376 secs Error: cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception. Execution failed for task ':transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lorg/apache/cordova/BuildHelper;