Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

128 - Extract OSS SDKs from the core library #167

Merged
merged 15 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions demoscannerapp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,16 @@ dependencies {
implementation project(':enioka_scan_m3');
}

// Implementation of the OSS providers
implementation project(':enioka_scan_zebra_dw');
implementation project(':enioka_scan_athesi_rd50te')
implementation project(':enioka_scan_athesi_spa43lte')
implementation project(':enioka_scan_bluebird')
implementation project(':enioka_scan_generalscan')
implementation project(':enioka_scan_honeywelloss_integrated')
implementation project(':enioka_scan_honeywelloss_spp')
implementation project(':enioka_scan_zebraoss')
implementation project(':enioka_scan_proglove');

// Android stuff

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

import com.enioka.scanner.api.ScannerSearchOptions;
import com.enioka.scanner.data.BarcodeType;
import com.enioka.scanner.sdk.athesi.RD50TE.AthesiE5LProvider;
import com.enioka.scanner.sdk.athesi.SPA43LTE.AthesiHHTProvider;
import com.enioka.scanner.sdk.athesi.RD50TE.AthesiRD50TEProvider;
import com.enioka.scanner.sdk.athesi.SPA43LTE.AthesiSPA43LTEProvider;
import com.enioka.scanner.sdk.bluebird.BluebirdProvider;
import com.enioka.scanner.sdk.generalscan.GsSppScannerProvider;
import com.enioka.scanner.sdk.honeywelloss.integrated.HoneywellOssIntegratedScannerProvider;
Expand Down Expand Up @@ -40,10 +40,11 @@ protected void onCreate(Bundle savedInstanceState) {
((Switch) findViewById(R.id.switchLaterConnections)).setChecked(preferences.getBoolean(ScannerServiceApi.EXTRA_SEARCH_KEEP_SEARCHING_BOOLEAN, options.allowLaterConnections));
((Switch) findViewById(R.id.switchInitialSearch)).setChecked(preferences.getBoolean(ScannerServiceApi.EXTRA_SEARCH_ALLOW_INITIAL_SEARCH_BOOLEAN, options.allowInitialSearch));
((Switch) findViewById(R.id.switchPairingFlow)).setChecked(preferences.getBoolean(ScannerServiceApi.EXTRA_SEARCH_ALLOW_PAIRING_FLOW_BOOLEAN, options.allowPairingFlow));
((Switch) findViewById(R.id.switchIntentDevices)).setChecked(preferences.getBoolean(ScannerServiceApi.EXTRA_SEARCH_ALLOW_INTENT_BOOLEAN, options.allowIntentDevices));

final Set<String> allowedProviderKeys = preferences.getStringSet(ScannerServiceApi.EXTRA_SEARCH_ALLOWED_PROVIDERS_STRING_ARRAY, Collections.emptySet());
((CheckBox) findViewById(R.id.checkAllowedHHTProvider)).setChecked(allowedProviderKeys.contains(AthesiHHTProvider.PROVIDER_KEY));
((CheckBox) findViewById(R.id.checkAllowedE5LProvider)).setChecked(allowedProviderKeys.contains(AthesiE5LProvider.PROVIDER_KEY));
((CheckBox) findViewById(R.id.checkAllowedHHTProvider)).setChecked(allowedProviderKeys.contains(AthesiSPA43LTEProvider.PROVIDER_KEY));
((CheckBox) findViewById(R.id.checkAllowedE5LProvider)).setChecked(allowedProviderKeys.contains(AthesiRD50TEProvider.PROVIDER_KEY));
((CheckBox) findViewById(R.id.checkAllowedBluebirdProvider)).setChecked(allowedProviderKeys.contains(BluebirdProvider.PROVIDER_KEY));
((CheckBox) findViewById(R.id.checkAllowedProgloveProvider)).setChecked(allowedProviderKeys.contains(ProgloveProvider.PROVIDER_KEY));
((CheckBox) findViewById(R.id.checkAllowedGsSppScannerProvider)).setChecked(allowedProviderKeys.contains(GsSppScannerProvider.PROVIDER_KEY));
Expand All @@ -53,8 +54,8 @@ protected void onCreate(Bundle savedInstanceState) {
((CheckBox) findViewById(R.id.checkAllowedHoneywellOssIntegratedScannerProvider)).setChecked(allowedProviderKeys.contains(HoneywellOssIntegratedScannerProvider.PROVIDER_KEY));

final Set<String> excludedProviderKeys = preferences.getStringSet(ScannerServiceApi.EXTRA_SEARCH_EXCLUDED_PROVIDERS_STRING_ARRAY, Collections.emptySet());
((CheckBox) findViewById(R.id.checkExcludedHHTProvider)).setChecked(excludedProviderKeys.contains(AthesiHHTProvider.PROVIDER_KEY));
((CheckBox) findViewById(R.id.checkExcludedE5LProvider)).setChecked(excludedProviderKeys.contains(AthesiE5LProvider.PROVIDER_KEY));
((CheckBox) findViewById(R.id.checkExcludedHHTProvider)).setChecked(excludedProviderKeys.contains(AthesiSPA43LTEProvider.PROVIDER_KEY));
((CheckBox) findViewById(R.id.checkExcludedE5LProvider)).setChecked(excludedProviderKeys.contains(AthesiRD50TEProvider.PROVIDER_KEY));
((CheckBox) findViewById(R.id.checkExcludedBluebirdProvider)).setChecked(excludedProviderKeys.contains(BluebirdProvider.PROVIDER_KEY));
((CheckBox) findViewById(R.id.checkExcludedProgloveProvider)).setChecked(excludedProviderKeys.contains(ProgloveProvider.PROVIDER_KEY));
((CheckBox) findViewById(R.id.checkExcludedGsSppScannerProvider)).setChecked(excludedProviderKeys.contains(GsSppScannerProvider.PROVIDER_KEY));
Expand Down Expand Up @@ -85,10 +86,11 @@ public void onClickSave(View v) {
editor.putBoolean(ScannerServiceApi.EXTRA_SEARCH_KEEP_SEARCHING_BOOLEAN, ((Switch) findViewById(R.id.switchLaterConnections)).isChecked());
editor.putBoolean(ScannerServiceApi.EXTRA_SEARCH_ALLOW_INITIAL_SEARCH_BOOLEAN, ((Switch) findViewById(R.id.switchInitialSearch)).isChecked());
editor.putBoolean(ScannerServiceApi.EXTRA_SEARCH_ALLOW_PAIRING_FLOW_BOOLEAN, ((Switch) findViewById(R.id.switchPairingFlow)).isChecked());
editor.putBoolean(ScannerServiceApi.EXTRA_SEARCH_ALLOW_INTENT_BOOLEAN, ((Switch) findViewById(R.id.switchIntentDevices)).isChecked());

final Set<String> allowedProviderKeys = new HashSet<>();
if (((CheckBox) findViewById(R.id.checkAllowedHHTProvider)).isChecked()) { allowedProviderKeys.add(AthesiHHTProvider.PROVIDER_KEY); }
if (((CheckBox) findViewById(R.id.checkAllowedE5LProvider)).isChecked()) { allowedProviderKeys.add(AthesiE5LProvider.PROVIDER_KEY); }
if (((CheckBox) findViewById(R.id.checkAllowedHHTProvider)).isChecked()) { allowedProviderKeys.add(AthesiSPA43LTEProvider.PROVIDER_KEY); }
if (((CheckBox) findViewById(R.id.checkAllowedE5LProvider)).isChecked()) { allowedProviderKeys.add(AthesiRD50TEProvider.PROVIDER_KEY); }
if (((CheckBox) findViewById(R.id.checkAllowedBluebirdProvider)).isChecked()) { allowedProviderKeys.add(BluebirdProvider.PROVIDER_KEY); }
if (((CheckBox) findViewById(R.id.checkAllowedProgloveProvider)).isChecked()) { allowedProviderKeys.add(ProgloveProvider.PROVIDER_KEY); }
if (((CheckBox) findViewById(R.id.checkAllowedGsSppScannerProvider)).isChecked()) { allowedProviderKeys.add(GsSppScannerProvider.PROVIDER_KEY); }
Expand All @@ -99,8 +101,8 @@ public void onClickSave(View v) {
editor.putStringSet(ScannerServiceApi.EXTRA_SEARCH_ALLOWED_PROVIDERS_STRING_ARRAY, allowedProviderKeys);

final Set<String> excludedProviderKeys = new HashSet<>();
if (((CheckBox) findViewById(R.id.checkExcludedHHTProvider)).isChecked()) { excludedProviderKeys.add(AthesiHHTProvider.PROVIDER_KEY); }
if (((CheckBox) findViewById(R.id.checkExcludedE5LProvider)).isChecked()) { excludedProviderKeys.add(AthesiE5LProvider.PROVIDER_KEY); }
if (((CheckBox) findViewById(R.id.checkExcludedHHTProvider)).isChecked()) { excludedProviderKeys.add(AthesiSPA43LTEProvider.PROVIDER_KEY); }
if (((CheckBox) findViewById(R.id.checkExcludedE5LProvider)).isChecked()) { excludedProviderKeys.add(AthesiRD50TEProvider.PROVIDER_KEY); }
if (((CheckBox) findViewById(R.id.checkExcludedBluebirdProvider)).isChecked()) { excludedProviderKeys.add(BluebirdProvider.PROVIDER_KEY); }
if (((CheckBox) findViewById(R.id.checkExcludedProgloveProvider)).isChecked()) { excludedProviderKeys.add(ProgloveProvider.PROVIDER_KEY); }
if (((CheckBox) findViewById(R.id.checkExcludedGsSppScannerProvider)).isChecked()) { excludedProviderKeys.add(GsSppScannerProvider.PROVIDER_KEY); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public void onClickBt1(View v) {
options.allowLaterConnections = preferences.getBoolean(ScannerServiceApi.EXTRA_SEARCH_KEEP_SEARCHING_BOOLEAN, options.allowLaterConnections);
options.allowInitialSearch = preferences.getBoolean(ScannerServiceApi.EXTRA_SEARCH_ALLOW_INITIAL_SEARCH_BOOLEAN, options.allowInitialSearch);
options.allowPairingFlow = preferences.getBoolean(ScannerServiceApi.EXTRA_SEARCH_ALLOW_PAIRING_FLOW_BOOLEAN, options.allowPairingFlow);
options.allowIntentDevices = preferences.getBoolean(ScannerServiceApi.EXTRA_SEARCH_ALLOW_INTENT_BOOLEAN, options.allowIntentDevices);
options.allowedProviderKeys = preferences.getStringSet(ScannerServiceApi.EXTRA_SEARCH_ALLOWED_PROVIDERS_STRING_ARRAY, options.allowedProviderKeys);
options.excludedProviderKeys = preferences.getStringSet(ScannerServiceApi.EXTRA_SEARCH_EXCLUDED_PROVIDERS_STRING_ARRAY, options.excludedProviderKeys);

Expand Down
27 changes: 26 additions & 1 deletion demoscannerapp/src/main/res/layout/activity_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,31 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textViewLaterConnections" />

<TextView
android:id="@+id/textIntentDevices"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="65dp"
android:lines="2"
android:text="@string/allow_intent_devices"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textViewPairingFlow" />

<Switch
android:id="@+id/switchIntentDevices"
android:layout_width="fill_parent"
android:layout_height="24dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintLeft_toRightOf="@+id/textIntentDevices"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textViewPairingFlow" />

<!-- ALLOWED PROVIDERS -->

<TextView
Expand All @@ -202,7 +227,7 @@
android:text="@string/allowed_providers"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textViewPairingFlow" />
app:layout_constraintTop_toBottomOf="@+id/textIntentDevices" />

<!-- Athesi HTT -->
<TextView
Expand Down
1 change: 1 addition & 0 deletions demoscannerapp/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<string name="allow_initial_search">Autoriser la recherche initiale:</string>
<string name="allow_later_connections">Autoriser les connexions retardataires:</string>
<string name="allow_pairing_flow">Autoriser les séquences d\'appairage:</string>
<string name="allow_intent_devices">Autoriser les scanners fonctionnant par Intent:</string>
<string name="allowed_providers">Providers Autorisés (vide = tous):</string>
<string name="excluded_providers">Providers Exclus (vide = aucun):</string>
<string name="symbology_selection">Selection de la symbology (vide = EAN,128):</string>
Expand Down
1 change: 1 addition & 0 deletions demoscannerapp/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<string name="allow_initial_search">Allow Initial Search:</string>
<string name="allow_later_connections">Allow Later Connections:</string>
<string name="allow_pairing_flow">Allow Pairing Flow:</string>
<string name="allow_intent_devices">Allow Intent Devices</string>
<string name="allowed_providers">Allowed Providers (empty = all):</string>
<string name="excluded_providers">Excluded Providers (empty = none):</string>
<string name="symbology_selection">Allowed Symbology (empty = EAN,128):</string>
Expand Down
Loading
Loading