I want to create a popup to get bluetooth on off permisson

I don't think this is correct, especially not for Android ≤ 11.

Here is a test APK that should work on all Android versions:

Maybe some can test it (on different Android versions) and give feedback.
I checked it on Android 9, 10, 11, 12.