Android Question API 33 and Notification permission

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
@Pendrush posted this question about The new API 33 notification permission


At the time I didn't have a phone which was on Android 13, but I now do.

I thought I would try to add the permission string to see what happens


I created a little program which can call Check or CheckandRequest

I have added AddPermission(android.permission.POST_NOTIFICATIONS) in the manifest

with Manifest android:targetSdkVersion="33"

Results:
(Google Pixel 2xl) Android Version 30 - check = false, checkandrequest = false (dialog does not appear)

(Google Pixel 5 running CalyxOS) Android version 33 - Check = false, checkandrequest (dialog appears)


However if I set the Manifest android:targetSdkVersion to "31"

Results:
(Google Pixel 2xl) Android Version 30 - check = false, checkandrequest = false (dialog does not appear)

(Google Pixel 5 running CalyxOS) Android version 33 - Check = no result, checkandrequest (dialog does NOT appear)

Conclusion:

I will need to release new versions of any app which has notifications to ensure that the user can choose to accept Notifications/

the code will need to check for API 33 and only checkandRequest if this is the case.

I'd be interested to know the thoughts of other developers
 

Attachments

  • chkpermission.zip
    14.6 KB · Views: 275

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
But that would mean that Notifications will not work on Android 13 phones for newly installed apps.
I did find that if the app was installed before update to Android 13 then the notifications do work.

as @Pendrush says,
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…