Home > other >  Android manifest POST_NOTIFICATIONS missing import
Android manifest POST_NOTIFICATIONS missing import

Time:05-29

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.

enter image description here

CodePudding user response:

After hours of struggle, there's the solution from where you can get this.

  • compileSdkPreview "Tiramisu"

  • targetSdkPreview "Tiramisu"

      android {
      namespace 'com.example.myapplication'
      //    compileSdk 32
     compileSdkPreview "Tiramisu"
    
      defaultConfig {
         applicationId "com.example.myapplication"
         minSdk 23
         //        targetSdk 32
         targetSdkPreview "Tiramisu"
         versionCode 1
         versionName "1.0"
    
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
     }
    
  • Related