Skip to content

Commit

Permalink
should fixed issue #952 with old Android smartphones which don't know…
Browse files Browse the repository at this point in the history
… BLUETOOTH_SCAN permission.
  • Loading branch information
oliexdev committed Jul 22, 2023
1 parent 60bcfd8 commit c085a6a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public void onClick(DialogInterface dialog, int id) {
alertDialog.setCanceledOnTouchOutside(false);
alertDialog.show();

} else if (shouldShowRequestPermissionRationale(Manifest.permission.BLUETOOTH_SCAN)) {
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && targetSdkVersion >= Build.VERSION_CODES.S && shouldShowRequestPermissionRationale(Manifest.permission.BLUETOOTH_SCAN)) {
AlertDialog.Builder builder = new AlertDialog.Builder(context);
Timber.d("No access Bluetooth scan permission granted");

Expand Down

0 comments on commit c085a6a

Please sign in to comment.