question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Notifications doesn't show up on Android 13. It doesn't request for permission. Xamarin.Forms

See original GitHub issue

Describe the bug On Android 13 in a xamarin.forms app the plugin does not request for permission (and doesn’t show the notification) even using the line indicated:

if (await LocalNotificationCenter.Current.AreNotificationsEnabled() == false)
{
    await LocalNotificationCenter.Current.RequestNotificationPermission();
}

Phone: Pixel 5 simulator OS Version: Android 13 (API 33) Plugin version: 10.1.4

Issue Analytics

  • State:closed
  • Created 5 months ago
  • Reactions:2
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
ComptonAlvarocommented, Jun 7, 2023

it works, in my case I forgot to add the permission <uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" /> in the manifest.

Thanks so much.

2reactions
thudugalacommented, Jun 2, 2023

@masterofdaemon Add these permissions

<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />

<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

https://github.com/thudugala/Plugin.LocalNotification/wiki/Usage-10.0.0--.Net-MAUI

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xamarin - Android 13 Notification Permission Prompt
We already have a priming page where we show the notification permission prompt in iOS. We just need to do this for all...
Read more >
Push notifications in android 13 - permissions
In Android 13, Google made some changes to the permissions for push notifications. To request the new notification permission from your app, ...
Read more >
Notification runtime permission
Declare the permission​​ To request the new notification permission from your app, update your app to target Android 13 and complete a similar...
Read more >
[Bug] Push Notification Permission is not supported by " ...
The Push Notification permission management for both iOS and Android (for Android >= 13) is not supported by the Permissions component.
Read more >
Adding a New Android Permission in a Xamarin App
Learn how to add a new permission to your Xamarin apps, such as the POST_NOTIFICATIONS permission added in Android 13.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found