Skip to content

Commit bdf2fbc

Browse files
committed
Disabled DWPlugin in CameraXLivePreviewActivity as it was starting internal imager when the user clicked on the scan button.
1 parent 42d8402 commit bdf2fbc

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

AI_MultiBarcodes_Capture/src/main/java/com/zebra/ai_multibarcodes_capture/java/CameraXLivePreviewActivity.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@
5151
import com.zebra.ai_multibarcodes_capture.helpers.PreferencesHelper;
5252
import com.zebra.ai_multibarcodes_capture.managedconfig.ManagedConfigurationReceiver;
5353

54+
import com.zebra.ai_multibarcodes_capture.settings.SettingsActivity;
5455
import com.zebra.ai_multibarcodes_capture.views.CaptureZoneOverlay;
56+
import com.zebra.datawedgeprofileintents.DWProfileBaseSettings;
57+
import com.zebra.datawedgeprofileintents.DWProfileCommandBase;
58+
import com.zebra.datawedgeprofileintents.DWScannerPluginDisable;
5559

5660
import java.util.ArrayList;
5761
import java.util.List;
@@ -786,6 +790,8 @@ public void onResume() {
786790
IntentFilter filter = new IntentFilter(ManagedConfigurationReceiver.ACTION_RELOAD_PREFERENCES);
787791
registerReceiver(reloadPreferencesReceiver, filter, RECEIVER_NOT_EXPORTED);
788792
LogUtils.d(TAG, "Registered BroadcastReceiver for managed configuration changes");
793+
794+
disableDatawedgePlugin();
789795
}
790796

791797
public void onPause() {
@@ -806,6 +812,25 @@ public void onPause() {
806812
disposeModels();
807813
}
808814

815+
private void disableDatawedgePlugin()
816+
{
817+
DWScannerPluginDisable dwplugindisable = new DWScannerPluginDisable(this);
818+
DWProfileBaseSettings settings = new DWProfileBaseSettings()
819+
{{
820+
mProfileName = CameraXLivePreviewActivity.this.getPackageName();
821+
}};
822+
823+
dwplugindisable.execute(settings, new DWProfileCommandBase.onProfileCommandResult() {
824+
@Override
825+
public void result(String profileName, String action, String command, String result, String resultInfo, String commandidentifier) {
826+
}
827+
@Override
828+
public void timeout(String profileName) {
829+
830+
}
831+
});
832+
}
833+
809834
@Override
810835
protected void onDestroy() {
811836

0 commit comments

Comments
 (0)