KamWithK / AnkiconnectAndroid

Unofficial Ankiconnect for Android (i.e. for Yomichan)
GNU General Public License v3.0
98 stars 14 forks source link

Notifications fix for Android API >= 33 #30

Closed Aquafina-water-bottle closed 1 year ago

Aquafina-water-bottle commented 1 year ago

Android API 33 seems to break notifications (such that one can't even change it in the settings). This PR adds the android.permission.POST_NOTIFICATIONS into the manifest to deal with it, as well as a bunch of extra logic to deal with what happens if the user declines the new runtime permission request.

Tested briefly on API 33 and 30 emulators.

This is currently a draft PR because we definitely need others to test this. I'd prefer if we get #28 merged before testing this PR, so we can test both before the next release.

Depends on #29.