Skip to content

Commit

Permalink
Update mlkit and deps and turn duplicate line logic on
Browse files Browse the repository at this point in the history
Updating to the latest mlkit and scanner seem to fix the samsung crash
  • Loading branch information
deadman96385 committed Feb 29, 2024
1 parent f4ee3f3 commit 1d4398d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ dependencies {
implementation 'com.google.zxing:core:3.4.1'

// def camerax_version = "1.0.2"
def camerax_version = "1.2.0-rc01"
def camerax_version = "1.3.1"
implementation "androidx.camera:camera-core:${camerax_version}"
implementation "androidx.camera:camera-camera2:${camerax_version}"
implementation "androidx.camera:camera-lifecycle:${camerax_version}"
implementation "androidx.camera:camera-view:${camerax_version}"

// implementation "androidx.camera:camera-view:1.0.0-alpha32"
implementation "com.google.mlkit:barcode-scanning:17.0.2"
implementation "com.google.mlkit:barcode-scanning:17.2.0"

implementation 'androidx.camera:camera-mlkit-vision:1.2.0-beta02'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

Expand Down Expand Up @@ -144,7 +146,7 @@ public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
// Toast.makeText(getContext(), "No Team Data to upload!",
// Toast.LENGTH_SHORT).show();
//} else {
call_sheets();
//call_sheets();
call_sheets_new();
//}
});
Expand Down Expand Up @@ -333,24 +335,24 @@ private void saveData(String bar_string) {
makeUploadFile(bar_string);

// Add non-split data to the list
//raw_data.add(new String[] {bar_string});
raw_data.add(new String[] {bar_string});

// Create a HashSet to keep track of the lines we've already seen
//Set<String> seenLines = listPreference.getObject("seen_lines", Set.class,
// new HashSet<>());
Set<String> seenLines = listPreference.getObject("seen_lines", Set.class,
new HashSet<>());

// Check for duplicate and don't upload role qr data
//if (!seenLines.contains(bar_string) & !bar_string.contains("Role")) {
if (!seenLines.contains(bar_string) & !bar_string.contains("Role")) {

// Add the line to the HashSet so we can check for duplicates in the future
//seenLines.add(bar_string);
seenLines.add(bar_string);

// Save the HashSet to the shared preferences
//listPreference.setObject("seen_lines", seenLines);
listPreference.setObject("seen_lines", seenLines);

// Save the data to the shared preferences
matchPreference.setObject("upload_data", raw_data);
//}
}
}

private void set_team(int id) {
Expand Down

0 comments on commit 1d4398d

Please sign in to comment.