As discussed at Google I/O 2023, registering receivers with intention using the RECEIVER_EXPORTED / RECEIVER_NOT_EXPORTED flag was introduced as part of Android 13 and is now a requirement for apps running on Android 14 or higher (U+).
If you do not implement this, the system will throw a security exception.
To allow the broadcast receiver to receive broadcasts from other apps, register the receiver using the following code:
context.registerReceiver(broadcastReceiver, intentFilter, RECEIVER_EXPORTED);
To register a broadcast receiver that does not receive broadcasts from other apps, including system apps, register the receiver using the following code:
context.registerReceiver(broadcastReceiver, intentFilter, RECEIVER_NOT_EXPORTED);
Note: That call will need minSdkVersion to be 26 (Android 8) al least
Check https://www.delasign.com/blog/android-studio-kotlin-broadcast-recievers-export-or-not/#:~:text=As%20discussed%20at%20Google%20I,will%20throw%20a%20security%20exception.