5757public class BluetoothLePlugin extends CordovaPlugin {
5858 //Initialization related variables
5959 private final int REQUEST_BT_ENABLE = 59627 ; /*Random integer*/
60- private final int REQUEST_ACCESS_COARSE_LOCATION = 59628 ;
60+ private final int REQUEST_ACCESS_FINE_LOCATION = 59628 ;
6161 private final int REQUEST_LOCATION_SOURCE_SETTINGS = 59629 ;
6262 private BluetoothAdapter bluetoothAdapter ;
6363 private boolean isReceiverRegistered = false ;
@@ -872,7 +872,7 @@ private void notifyAction(JSONArray args, CallbackContext callbackContext) {
872872 public void hasPermissionAction (CallbackContext callbackContext ) {
873873 JSONObject returnObj = new JSONObject ();
874874
875- addProperty (returnObj , "hasPermission" , cordova .hasPermission (Manifest .permission .ACCESS_COARSE_LOCATION ));
875+ addProperty (returnObj , "hasPermission" , cordova .hasPermission (Manifest .permission .ACCESS_FINE_LOCATION ));
876876
877877 callbackContext .success (returnObj );
878878 }
@@ -887,7 +887,7 @@ public void requestPermissionAction(CallbackContext callbackContext) {
887887 }
888888
889889 permissionsCallback = callbackContext ;
890- cordova .requestPermission (this , REQUEST_ACCESS_COARSE_LOCATION , Manifest .permission .ACCESS_COARSE_LOCATION );
890+ cordova .requestPermission (this , REQUEST_ACCESS_FINE_LOCATION , Manifest .permission .ACCESS_FINE_LOCATION );
891891 }
892892
893893 public void onRequestPermissionResult (int requestCode , String [] permissions , int [] grantResults ) throws JSONException {
@@ -898,7 +898,7 @@ public void onRequestPermissionResult(int requestCode, String[] permissions, int
898898 //Just call hasPermission again to verify
899899 JSONObject returnObj = new JSONObject ();
900900
901- addProperty (returnObj , "requestPermission" , cordova .hasPermission (Manifest .permission .ACCESS_COARSE_LOCATION ));
901+ addProperty (returnObj , "requestPermission" , cordova .hasPermission (Manifest .permission .ACCESS_FINE_LOCATION ));
902902
903903 permissionsCallback .success (returnObj );
904904 }
0 commit comments