You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi,
I am experiencing issues while discovering devices using Android MArshmellow. It simply fails on discovery anything...I read about the permissions over location (coarse and fine) that should be put into the manifest and programmatically. However, I had no luck up to now.
Any advice about getting rid of this issues? is a version that deals with this problem on schedule? I'm currently using version 0.5.1.
sbk
The text was updated successfully, but these errors were encountered:
Eventually I've found a sort of a workaround. I won't create a pull request as it would require the installation of the cordova plugin cordova-plugin-android-support-v4.
Basically the modification I did was merely this, in BCBluetooth.java:
public boolean execute(final String action, final JSONArray json,
final CallbackContext callbackContext) throws JSONException {
/* ...omissis...*/
if(action.equals("startClassicalScan")){
Log.i(TAG,"startClassicalScan");
if(bluetoothAdapter.isEnabled()){
try{
if(((android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP)) && //23 >=21 for zonta's tablet
(!cordova.hasPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION))){
if (!cordova.getActivity().shouldShowRequestPermissionRationale(android.Manifest.permission.ACCESS_COARSE_LOCATION)) {
cordova.requestPermissions(this,100,
new String[]{android.Manifest.permission.ACCESS_COARSE_LOCATION});
}
}
} catch (Exception e) {
e.printStackTrace();
}
if(bluetoothAdapter.startDiscovery()){
callbackContext.success();
}else{
callbackContext.error("start classical scan error!");
}
}else{
callbackContext.error("your bluetooth is not open!");
}
}
/* ...omissis...*/
}
hi,
I am experiencing issues while discovering devices using Android MArshmellow. It simply fails on discovery anything...I read about the permissions over location (coarse and fine) that should be put into the manifest and programmatically. However, I had no luck up to now.
Any advice about getting rid of this issues? is a version that deals with this problem on schedule? I'm currently using version 0.5.1.
sbk
The text was updated successfully, but these errors were encountered: