Why are so many ionic native plugins in Ionic not usable especially the local-notification plugins?
I tried baidu-push and phonegap local notification (Both didnt show anything) . Then i tried local-notification from Katzer. After i added the plugin my build crashed when executing the subprocess: processReleaseManifest
Errormessage appears: AndroidManifest.xml:28:13-35 Error:
Attribute meta-data#android.support.VERSION@value value=(25.4.0) from [com.android.support:appcompat-v7:25.4.0] AndroidManifest.xml:28:13-35
is also present at [com.android.support:support-v4:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add ‘tools:replace=“android:value”’ to element at AndroidManifest.xml:26:9-28:38 to override.
Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(25.4.0) from [com.android.support:appcompat-v7:25.4.0] AndroidManifest.xml:28:13-35
After that i saw somewhere the tip to update build.gradle file with this code piece:
The next time i tried to execute the build process i received following error:
\Builder.java:32: error: package android.support.v4.media.app.NotificationCompat does not exist
Builder.java:130: error: cannot find symbol
symbol: method setChannelId(String)
\Builder.java:296: error: cannot find symbol
Builder.java:298: error: cannot find symbol
style = new MediaStyle(builder)
I followed the documentation how to implement everything. When i remove the Katzer local-notification plugin my build works again. After the last error message i have the conclusion that all Ionic notification plugins i needed and were looking for are deprecated.
Its very sad for me, that i m not able to show a simple notification for my app.
Thank you for your tip. I tried capacitor, but i received now transpile problems. And i followed documentation when adding it to my apps repository: node_modules/@capacitor/core/dist/esm/global.d.ts, line: 3
Property ‘PluginRegistry’ does not exist on type ‘"./core-plugin-definitions"’.
@aaronksaunders, I cannot run the app. Currently I only tested it on android. Here the short summary : my app is stable and runs but without any local-notification plugin of Cordova added and without using capacitor. My first goal was using ionic native plug-ins for local-notification but nothing works. Then @netkow gave me the tip with capacitor, but this doesn’t work too. Here the build works but I have a frozen white screen after splash screen when running the app. And the big problem is, I really like to have some notification shown when app is closed in the background. It’s really depressing that it’s so hard to find something ionic cordova based for such a minor feature. But thx for your help anyway.
Uncaught TypeError: Object(…) is not a function at LocalNotifications.schedule (index.js:49) at HomePage.webpackJsonp.76.HomePage.launchNotification (home.ts:76) at home.ts:49 at PrivateChannel.Dispatcher.emit (pusher.js:1596) at PrivateChannel.Channel.handleEvent (pusher.js:3238) at pusher.js:136 at ConnectionManager.Dispatcher.emit (pusher.js:1596) at message (pusher.js:8168) at Connection.Dispatcher.emit (pusher.js:1596) at message (pusher.js:2984) I tried to update @ionic-native and i got the same error, but at the startup of the application.
Then i saw the tip, that user of this plugin should use an version of the module @ionic-native/local-notifications : 4.7.0 ,to access cordova local-notification plugin from Katzer. My version was > 5.0.0 , which didnt work. So i changed the version to 4.7.0. And thats it.