Trying to implement the notification permission for android 13 or "Tiramisu" but failed to get the import for that permission.
Currently:
targeted SDK version is 32
compile SDK version is 32
I’ve declared it also in manifiest as below:
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"
import i’m using:
import android.Manifest
- But even not getting import in my fragment.
6
Answers
I faced the same problem,
Steps to fix :
Install SDK Platforms
SDK Platform 33
Android TiramisuPrivacy Sandbox Preview
Install SDK Tools :
Android SDK build Tools 33
I solved it by using compileSdkVersion 33 in the gradle file at the Module level. Then it allowed me to use the POST_NOTIFICATIONS permission without any issue.
Just add this import:
Set targetSDKVersion to 33.
If for some reason it complains about your minimum supported and you’re in no position to update, use the following instead:
You need to prefix the Manifest statement with android., e.g.,