Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48977

Ionic Capacitor "PushNotifications" plugin is not implemented on android

$
0
0

Hi all,
I have a problem when a try to request permissions with @capacitor/push-notifications plugin. I followed every step described in the README and I’m using Ionic and Vue 3.

This is the package.json:

...
    "@capacitor/android": "^3.2.0",
    "@capacitor/core": "^3.2.0",
    "@capacitor/push-notifications": "^1.0.3",
    "@ionic/vue": "^5.4.0"
...

This is the method that requests the permissions:

requestFCMPermissions(context: AuthContext) {
      PushNotifications.requestPermissions().then(result => {
        if (result.receive === "granted") {
          PushNotifications.register();
          ...
        } else {
          ...
        }
      });
      ...
}

Of course this does not work when a try by Web, but, when I assembly an APK and profile that, it responses me an error in console log:

 "PushNotifications" plugin is not implemented on android

Anyone know why? Thanks!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48977

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>