Skip to content

Commit

Permalink
Merge pull request #32 from Anyline/release/39.0.0
Browse files Browse the repository at this point in the history
Release/39.0.0
  • Loading branch information
patrickAnyline authored May 11, 2022
2 parents 2e6ee39 + e232d1b commit 85e3969
Show file tree
Hide file tree
Showing 43 changed files with 2,488 additions and 1,795 deletions.
17 changes: 12 additions & 5 deletions AnylineSDK-Examples/AnylineSDK-Examples-Source/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ apply plugin: 'kotlinx-serialization'
apply plugin: 'dagger.hilt.android.plugin'

buildscript {
ext.sdk_version = "38.0.1"
ext.version_code = 361
ext {
sdk_version = "39.0.0"
version_code = 365

timber_version = '5.0.1'
leakcanary_version = '2.8.1'
}
repositories {
mavenCentral()
}
Expand Down Expand Up @@ -84,6 +89,11 @@ dependencies {
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.github.bumptech.glide:glide:4.11.0'

implementation "com.jakewharton.timber:timber:$timber_version"

// debugImplementation because LeakCanary should only run in debug builds.
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakcanary_version"

// for update manager
//implementation 'com.google.android.play:core:1.9.0'

Expand All @@ -93,9 +103,6 @@ dependencies {
//include AnylineSDK from maven
implementation "io.anyline:anylinesdk:$sdk_version"

// Face authentication
implementation "io.anyline:facetec-sdk:9.4.5"

//Play core library
implementation 'com.google.android.play:core-ktx:1.8.1'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,15 @@
android:name="android.support.PARENT_ACTIVITY"
android:value="io.anyline.examples.MainActivity" />
</activity>
<activity
android:name=".barcode.ScanBarcodeWithOverlaysActivity"
android:label="Barcode with Overlays"
android:parentActivityName=".MainActivity"
android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="io.anyline.examples.MainActivity" />
</activity>
<activity
android:name=".id.ScanBarcodePDF417Activity"
android:label="@string/pdf_417"
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import android.widget.CheckedTextView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;

import java.util.ArrayList;

Expand All @@ -41,7 +40,7 @@ public class BarcodeListViewActivity extends BaseToolbarActivity {
private ListView list;
private ListAdapter adapter;
private CheckedTextView allBarcodeTypesCheckBox;
private BarcodePrefferences barcodePrefferences;
private BarcodePreferences barcodePreferences;
ArrayList<BarcodeModel> preselectedItems;
ArrayList<BarcodeModel> preselectedItemsUponStart; // save the selected barcodes at the beginning - to check if changes occured
ArrayList<BarcodeModel> itemsList;
Expand All @@ -51,13 +50,13 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.barcode_list_view_activity);

barcodePrefferences = BarcodePrefferences.getInstance(this);
preselectedItems = barcodePrefferences.get();
barcodePreferences = BarcodePreferences.getInstance(this);
preselectedItems = barcodePreferences.get();
if (preselectedItems == null || preselectedItems.size() == 0) {
barcodePrefferences.setDefault();
preselectedItems = barcodePrefferences.get();
barcodePreferences.setDefault();
preselectedItems = barcodePreferences.get();
}
preselectedItemsUponStart = barcodePrefferences.get();
preselectedItemsUponStart = barcodePreferences.get();
itemsList = new ArrayList<>();

list = findViewById(R.id.listview);
Expand Down Expand Up @@ -100,7 +99,7 @@ public void onClick(View view) {
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
//barcodePrefferences.setDefault();
preselectedItems = barcodePrefferences.getDefault();
preselectedItems = barcodePreferences.getDefault();
adapter.notifyDataSetChanged();
}
})
Expand Down Expand Up @@ -353,7 +352,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
showAlertNoBarcodeSelected();
return false;
} else {
barcodePrefferences.setBarcodeTypes(preselectedItems);
barcodePreferences.setBarcodeTypes(preselectedItems);
//onBackPressed();
Intent intent = new Intent();
setResult(2, intent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@
import java.util.ArrayList;
import java.util.List;

public class BarcodePrefferences {
public class BarcodePreferences {
private static final String SHARED_PREFS_ANYLINE = "AnylinePreferences";

private static BarcodePrefferences instance;
private static BarcodePreferences instance;

private final SharedPreferences prefs;
private final SharedPreferences.Editor editor;

@SuppressLint("CommitPrefEdits")
private BarcodePrefferences(Context context) {
private BarcodePreferences(Context context) {
prefs = context.getSharedPreferences(SHARED_PREFS_ANYLINE, Context.MODE_PRIVATE);
editor = prefs.edit();
}

public static BarcodePrefferences getInstance(Context context) {
public static BarcodePreferences getInstance(Context context) {
if (instance == null) {
instance = new BarcodePrefferences(context);
instance = new BarcodePreferences(context);
}
return instance;
}
Expand Down
Loading

0 comments on commit 85e3969

Please sign in to comment.