Need to understand the proper settings behind the BEEP and VIBRATE settings using the Capture SDK. When setting the DEVICE_RUMBLE_CONFIG to 1 or 0 it seems I get an error and nothing is changed. Same issue with DEVICE_SOUND_CONFIG.
if (getBRSharedPreferenceBoolean(PreferencesActivity.PREF_SOCKET_SCANNER_VIBRATE, false)) {
mDevice.setProperty(Property.create(Property.DEVICE_RUMBLE_CONFIG,1), propertyCallback);
} else {
mDevice.setProperty(Property.create(Property.DEVICE_RUMBLE_CONFIG,0), propertyCallback);
}
if (getBRSharedPreferenceBoolean(PreferencesActivity.PREF_SOCKET_SCANNER_BEEP, false)) {
mDevice.setProperty(Property.create(Property.DEVICE_SOUND_CONFIG,1), propertyCallback);
} else {
mDevice.setProperty(Property.create(Property.DEVICE_SOUND_CONFIG,0), propertyCallback);
}
PropertyCallback propertyCallback = new PropertyCallback() {
@Override
public void onComplete(@Nullable CaptureError captureError, @Nullable Property property) {
if (captureError != null) {
Log.d("onComplete", String.format("capture error %s", captureError.getMessage()));
} else {
if (property != null) {
Log.d("onComplete", String.format("property set %d", property.getId()));
}
}
}
};