Jump to content
Registration disabled at the moment Read more... ×
Mike Price

Delphi Android bluetooth_scan permission missing

Recommended Posts

I have upgrade to Delph 11.2 an android program that was working in 11.1 now comes up with bluetooth_scan permission missing. I think I should ask for android.permission.blue_tooth but this is not available in the androidapi.jni.os

 

Any suggestions much appreciated.

Share this post


Link to post

Hi,

 

image.png.0050c803f8b8e09fc5b099eb60467657.png

 

unit2.pas (C:\Users\Public\Documents\Embarcadero\Studio\22.0\Samples\Object Pascal\Multi-Device Samples\Device Sensors and Services\Bluetooth\Beacons\Beacons Proximity)

 

    LOCATION_PERMISSION = 'android.permission.ACCESS_FINE_LOCATION';
    BLUETOOTH_SCAN_PERMISSION = 'android.permission.BLUETOOTH_SCAN';
    BLUETOOTH_ADVERTISE_PERMISSION = 'android.permission.BLUETOOTH_ADVERTISE';
    BLUETOOTH_CONNECT_PERMISSION = 'android.permission.BLUETOOTH_CONNECT';

 

  if TOSVersion.Check(12) then
    Permissions := [LOCATION_PERMISSION, BLUETOOTH_SCAN_PERMISSION, BLUETOOTH_ADVERTISE_PERMISSION, BLUETOOTH_CONNECT_PERMISSION]
  else
    Permissions := [LOCATION_PERMISSION];

 

regards,

mm

Edited by mausmb

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×