openvehicles / Open-Vehicle-Android

Android App for OVMS
Other
55 stars 45 forks source link

Notifications don't work on Android 13 #146

Closed billybednar closed 1 year ago

billybednar commented 1 year ago

Starting with Android 13, notifications are disabled by default and the POST_NOTIFICATIONS runtime permission must be granted for notifications to work. This app targets Android 13 (as of c23b3dbd772bdae7e82601797cd3a71c2623a78c) and does not request this permission, so notifications do not work. As the permission is not declared, it can not be manually granted from app settings nor by using ADB.

dexterbg commented 1 year ago

I can only test the fix in an emulator, can you please try on your Android 13 device?

billybednar commented 1 year ago

That fixed it.

The behavior when the notification permission is denied doesn't seem ideal, but I'll make a separate issue for that once I play with it a bit more.

markwj commented 1 year ago

FYI: A user 'Larry' provides the following link regarding this issue:

https://source.android.com/docs/core/display/notification-perm

dexterbg commented 1 year ago

I already published the fix on Google Play yesterday, maybe 'Larry' can test that?