title: What permissions would I need on Android if I want to use Bluetooth and Target SDK 31 but my minimum SDK is 23?
body: <p><strong>Problem:</strong> I am wanting to make an application that requires Bluetooth functionality on Android and I'm not quite sure what permissions are required. I am going off of this documentation <a href="https://developer.android.com/guide/topics/connectivity/bluetooth/permissions" rel="nofollow noreferrer">https://developer.android.com/guide/topics/connectivity/bluetooth/permissions</a>, but the wording confuses me. In my app gradle file my <code>targetSdk</code> and <code>compileSdk</code> are both set to 31 which would be Android 12. My <code>minSdk</code> is set to 23 however which would be Android 6.0. At the very least I know my application will need to be able to scan for Bluetooth devices, connect, and communicate with devices. My app will not derive location from the Bluetooth scans.</p>
  <p>For a bare minimum my permissions needed would look like this:</p>
  <pre class="lang-xml prettyprint-override"><code>
  &lt;manifest&gt;
      &lt;!-- Request legacy Bluetooth permissions on older devices. --&gt;
      &lt;uses-permission android:name=&quot;android.permission.BLUETOOTH&quot;
                       android:maxSdkVersion=&quot;30&quot; /&gt;
      &lt;uses-permission android:name=&quot;android.permission.BLUETOOTH_ADMIN&quot;
                       android:maxSdkVersion=&quot;30&quot; /&gt;
  
      &lt;!-- Needed only if your app looks for Bluetooth devices.
           If your app doesn't use Bluetooth scan results to derive physical
           location information, you can strongly assert that your app
           doesn't derive physical location. --&gt;
      &lt;uses-permission android:name=&quot;android.permission.BLUETOOTH_SCAN&quot; /&gt;
  
      &lt;!-- Needed only if your app communicates with already-paired Bluetooth
           devices. --&gt;
      &lt;uses-permission android:name=&quot;android.permission.BLUETOOTH_CONNECT&quot; /&gt;
  
      ...
  &lt;/manifest&gt;
  </code></pre>
  <p>This comes from the linked webpage under &quot;Target Android 12 or Higher&quot; but I'm wondering if I also need to abide by the &quot;Target Android 11 or Lower&quot; section as well since my minimum Android SDK is Android 6.0. So would I be good with following the Android 12 target instructions or the Android 11 or Lower target instructions?</p>