Unresolved reference: Manifest from custom Permission

Viewed 33

I have an app with a broadcast receiver to receive input from an external sdk, and in that broadcast receiver i send intent to an other broadcast receiver in my app. I have defined in the manifest

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.xxx">

<permission
        android:name="com.xxx.permission.BR_PERMISSION_BLUEDOT"
        android:label="BR_PERMISSION_BLUEDOT"
        android:protectionLevel="dangerous" />

<uses-permission android:name="com.xxx.permission.BR_PERMISSION_BLUEDOT" />

in the broadcast receiver for the external sdk onReceive method i have defined

context.sendBroadcast(intent, com.xxx.Manifest.permission.BR_PERMISSION_BLUEDOT)

to send intent to the fragment, where is declared an other BR

 private fun configureReceiver() {
        val filter = IntentFilter()
        //Filter
        filter.addAction(BluedotGeoTriggerReceiver.INTENT_ON_ZONE_INFO_UPDATE)
        filter.addAction(BluedotGeoTriggerReceiver.INTENT_ON_ZONE_ENTRY_EVENT)
        filter.addAction(BluedotGeoTriggerReceiver.INTENT_ON_ZONE_EXIT_EVENT)
        //register
        baseContext.registerReceiver(ftxBluedotBroadcastReceiver, filter, com.xxx.Manifest.permission.BR_PERMISSION_BLUEDOT, null)
    }

The problem is during the build, i get this error

Unresolved reference: Manifest
0 Answers
Related