Issue
Note : its and ionic (Capacitor) project and i am using Android Studio for testing.
requestNotificationsPermissions(): void {
PushNotifications.requestPermission().then(result => {
if (result.granted) {
PushNotifications.register();
}
}).catch((err: any) => {
console.log(err);
});
}
Solution
I see you are using PushNotifications
.
It used to happen to me when I forgot to include google-services.json
in my Android project folder. If that is the case, include google-services.json
inside android/app/
folder.
See the official plugin docs: https://capacitorjs.com/docs/apis/push-notifications#android
Answered By - tmavrin
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.