File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1130,10 +1130,11 @@ export class Bluetooth extends BluetoothCommon {
11301130 if ( ! hasPermission ) {
11311131 const ctx = this . _getContext ( ) ;
11321132 // CLog(CLogTypes.info, 'app context', ctx);
1133+ const neededPermision = getAndroidSDK ( ) < 29 ? android . Manifest . permission . ACCESS_COARSE_LOCATION : android . Manifest . permission . ACCESS_FINE_LOCATION ;
11331134
1134- hasPermission = android . content . pm . PackageManager . PERMISSION_GRANTED === androidx . core . content . ContextCompat . checkSelfPermission ( ctx , android . Manifest . permission . ACCESS_FINE_LOCATION ) ;
1135+ hasPermission = android . content . pm . PackageManager . PERMISSION_GRANTED === androidx . core . content . ContextCompat . checkSelfPermission ( ctx , neededPermision ) ;
1136+ CLog ( CLogTypes . info , `coarseLocationPermissionGranted ---- ${ neededPermision } permission granted?` , hasPermission ) ;
11351137 }
1136- CLog ( CLogTypes . info , 'coarseLocationPermissionGranted ---- ACCESS_FINE_LOCATION permission granted?' , hasPermission ) ;
11371138 return hasPermission ;
11381139 }
11391140
You can’t perform that action at this time.
0 commit comments