Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Push Notifications] checkPermissions() always return granted #1476

Closed
bpolaszek opened this issue Mar 10, 2023 · 2 comments
Closed

[Push Notifications] checkPermissions() always return granted #1476

bpolaszek opened this issue Mar 10, 2023 · 2 comments
Labels

Comments

@bpolaszek
Copy link

Bug Report

Plugin(s)

  • @capacitor/push-notifications@4.1.2

Capacitor Version

Latest Dependencies:

  @capacitor/cli: 4.7.0
  @capacitor/core: 4.7.0
  @capacitor/android: 4.7.0
  @capacitor/ios: 4.7.0

Installed Dependencies:

  @capacitor/core: 4.7.0
  @capacitor/android: 4.7.0
  @capacitor/ios: 4.7.0
  @capacitor/cli: 4.7.0

Platform(s)

  • Android (untested on IOS)

Current Behavior

Fresh install of the app.
The following code always returns true, even if no permissions have been granted yet:

import { PushNotifications } from '@capacitor/push-notifications';
const {receive} = await PushNotifications.checkPermissions();
console.log('granted' === receive); // true

Expected Behavior

receive should be prompt.

Additional Context

Since my device runs Android 13, I don't receive notifications anymore, even if the registration process successfully gets a token (without prompting the user). Behind the scenes, notification permission is not granted.
Temporary trick is to add package @capacitor/local-notifications which will prompt the user for notification permissions as soon as the app boots (not UX-friendly, but still better than nothing at all).

@ionitron-bot ionitron-bot bot added the triage label Mar 10, 2023
@jcesarmobile
Copy link
Member

duplicate of #1135

@jcesarmobile jcesarmobile closed this as not planned Won't fix, can't repro, duplicate, stale Mar 10, 2023
@ionitron-bot
Copy link

ionitron-bot bot commented Apr 9, 2023

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Apr 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants