Many native plugins not usable/ Especially local notifications plugins

Why are so many ionic native plugins in Ionic not usable especially the local-notification plugins? :frowning:
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:

configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == ‘com.android.support’) {
if (!requested.name.startsWith(“multidex”)) {
details.useVersion ‘25.3.0’
}
}
}
}

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
import android.support.v4.media.app.NotificationCompat.MediaStyle;

Builder.java:130: error: cannot find symbol
.setChannelId(options.getChannel())
^
symbol: method setChannelId(String)

\Builder.java:296: error: cannot find symbol
MediaStyle style;
^
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.

Many plugins are created and managed by the Community, so results will vary.

How you checked out Capacitor yet? It’s Ionic’s official native runtime. There’s a local notifications plugin.

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"’.

   L2:  declare const Capacitor: _Capacitor;
   L3:  declare const Plugins: import("./core-plugin-definitions").PluginRegistry;
   L4:  export { Capacitor, Plugins };

Okay, node_modules@capacitor\core\dist\esm\global.d.ts was wrong and transpile works now after i updated global.d.ts with this code piece:

import { Capacitor as _Capacitor } from ‘./definitions’;
import * as _Plugins from “./core-plugin-definitions”;
declare const Capacitor: _Capacitor;

declare const Plugins: _Plugins.PluginRegistry;
export { Capacitor, Plugins };

NEWS: The build with capacitor was successfull now but when i start my app after splash screen the app is frozen with a white screen. :frowning:

you cannot run on ios device with capacitor, there appears to be a bug… somewhere??

@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. :confused: 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. :pray:

So @netkow and @aaronksaunders, i didnt continue to work with capacitor but started from the beginning to integrate this plugin and searched the whole web for solutions of my problems. And i managed to get Local-Plugin working. But it was lots of work: big research, configuration changes and one javascript version of local-notification plugin was not working. Through debugging i found out this error:

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.