Skip to content

Commit

Permalink
Merge pull request #33 from Anyline/release/40.0.0
Browse files Browse the repository at this point in the history
Release/40.0.0
  • Loading branch information
patrickAnyline authored Jun 22, 2022
2 parents 85e3969 + dbe4d84 commit ce4d4cc
Show file tree
Hide file tree
Showing 51 changed files with 1,598 additions and 2,660 deletions.
17 changes: 9 additions & 8 deletions AnylineSDK-Examples/AnylineSDK-Examples-Source/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ apply plugin: 'dagger.hilt.android.plugin'

buildscript {
ext {
sdk_version = "39.0.0"
version_code = 365
sdk_version = "40.0.0"
app_version = "40.0.0"
version_code = 367

timber_version = '5.0.1'
leakcanary_version = '2.8.1'
Expand All @@ -25,15 +26,15 @@ buildscript {
}

android {
compileSdkVersion 30
compileSdkVersion versions.compileSdk
buildToolsVersion '28.0.3'

defaultConfig {
vectorDrawables.useSupportLibrary = true
minSdkVersion 21
targetSdkVersion 30
minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk
versionCode version_code
versionName sdk_version
versionName app_version

ndk {
abiFilters "armeabi-v7a", "arm64-v8a"
Expand Down Expand Up @@ -98,7 +99,7 @@ dependencies {
//implementation 'com.google.android.play:core:1.9.0'

//uncomment if you want to import the AnylineSdk project
// implementation project(':AnylineSdk')
//implementation project(':AnylineSdk')

//include AnylineSDK from maven
implementation "io.anyline:anylinesdk:$sdk_version"
Expand All @@ -110,7 +111,7 @@ dependencies {

//Kotlin
implementation "androidx.core:core-ktx:1.3.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}"

//Kotlin coroutines
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,15 @@
android:name="android.support.PARENT_ACTIVITY"
android:value="io.anyline.examples.MainActivity" />
</activity>
<activity
android:name=".id.ScanVehicleRegistrationCertificateActivity"
android:label="@string/vehicle_registration_certificate"
android:parentActivityName=".MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="io.anyline.examples.MainActivity" />
</activity>

<activity
android:name=".ocr.ScanVehicleIdentificationNumberActivity"
android:label="@string/vin"
Expand Down Expand Up @@ -338,16 +347,6 @@
android:name=".id.NFC.NFCScanActivity"
android:screenOrientation="portrait" />

<activity
android:name=".ocr.tin.ScanTINActivity"
android:label="@string/tin"
android:parentActivityName=".MainActivity"
android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="io.anyline.examples.MainActivity" />
</activity>

<activity
android:name=".tire.tin.ScanTINActivity"
android:label="@string/tin"
Expand Down Expand Up @@ -412,8 +411,6 @@
android:parentActivityName=".id.ScanUniversalIdActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.DarkActionBar" />


</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"camera" : {
"captureResolution" : "1080p"
},
"flash" : {
"mode": "manual",
"alignment": "bottom_right",
"imageOn": "flash_on",
"imageOff": "flash_off"
},
"viewPlugin" : {
"plugin":{
"id":"ID",
"idPlugin": {
"vehicleRegistrationCertificateConfig": {
"layoutVehicleCertificate": {
"documentNumber": {"scanOption": 0, "minConfidence": 50},
"licensePlate": {"scanOption": 0, "minConfidence": 50},
"lastName": {"scanOption": 0, "minConfidence": 50},
"firstName": {"scanOption": 0, "minConfidence": 50},
"address": {"scanOption": 0, "minConfidence": 50},
"firstIssued": {"scanOption": 0, "minConfidence": 50},
"manufacturerCode": {"scanOption": 0, "minConfidence": 50},
"vehicleTypeCode": {"scanOption": 0, "minConfidence": 50},
"vehicleIdentificationNumber": {"scanOption": 0, "minConfidence": 50},
"brand": {"scanOption": 0, "minConfidence": 50},
"vehicleType": {"scanOption": 0, "minConfidence": 50},
"displacement": {"scanOption": 0, "minConfidence": 50},
"tire": {"scanOption": 0, "minConfidence": 50}
}
}
}
},
"cutoutConfig" : {
"style": "animated_rect",
"maxWidthPercent": "90%",
"maxHeightPercent": "80%",
"alignment": "center",
"strokeWidth": 3,
"cornerRadius": 8,
"strokeColor": "FFFFFF",
"outerColor": "000000",
"outerAlpha": 0.3,
"ratioFromSize": {
"width": 90,
"height": 46
},
"cropPadding": {
"x": -50,
"y": -50
},
"cropOffset": {
"x": 0,
"y": 0
},
"feedbackStrokeColor": "0099FF"
},
"scanFeedback" : {
"style": "CONTOUR_RECT",
"visualFeedbackRedrawTimeout": 100,
"strokeColor": "0099FF",
"fillColor" : "220099FF",
"beepOnResult": true,
"vibrateOnResult": true,
"strokeWidth": 2
},
"cancelOnResult" : true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import android.os.Bundle;
import android.widget.TextView;


import androidx.appcompat.app.AlertDialog;
import at.nineyards.anyline.core.LicenseException;
import io.anyline.AnylineSDK;
Expand All @@ -18,12 +17,8 @@

public class MainActivity extends BaseToolbarActivity {

private TextView messageCounter;

@Override
protected void onCreate(Bundle savedInstanceState) {


super.onCreate(savedInstanceState);

try {
Expand All @@ -50,8 +45,8 @@ public void onClick(DialogInterface dialog, int which) {
//add the view pager
if (getSupportFragmentManager().findFragmentById(R.id.fragment_container) == null) {
getSupportFragmentManager().beginTransaction()
.add(R.id.fragment_container,
new ViewPagerFragment()).commit();
.add(R.id.fragment_container,
new ViewPagerFragment()).commit();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public enum ScanModule {
CATTLE_TAG,
ID_CARD,
PASSPORT_VISA,
VEHICLE_REGISTRATION_CERTIFICATE,

/**
* @deprecated As the background-selection does not exist anymore, the mode should not be used anymore
Expand Down Expand Up @@ -80,7 +81,8 @@ public static Boolean isIDScanModule (ScanModule scanModule) {
scanModule == ScanModule.GERMAN_ID_FRONT ||
scanModule == ScanModule.UNIVERSAL_ID ||
scanModule == ScanModule.ID_CARD ||
scanModule == ScanModule.PASSPORT_VISA;
scanModule == ScanModule.PASSPORT_VISA ||
scanModule == ScanModule.VEHICLE_REGISTRATION_CERTIFICATE;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
Expand All @@ -14,10 +16,10 @@

public class OthersFragment extends BaseFragment implements BaseGridListAdapter.OnItemClickListener {

public static final String MRO = "MRO_FRAGMENT";
public static final String VEHICLE = "VEHICLE_FRAGMENT";
public static final String DOCUMENT_IDENTITY_FRAGMENT = "DOCUMENT_IDENTITY_FRAGMENT";

private boolean isMRO = false;
private boolean isVehicle = false;
private boolean isIdentityDocument = false;

private String[] classes;
Expand All @@ -31,7 +33,7 @@ public OthersFragment() {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
isMRO = getArguments().getBoolean(MRO);
isVehicle = getArguments().getBoolean(VEHICLE);
isIdentityDocument = getArguments().getBoolean(DOCUMENT_IDENTITY_FRAGMENT);
}
}
Expand All @@ -40,17 +42,17 @@ public void onCreate(Bundle savedInstanceState) {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

Resources res = getContext().getResources();
if(isIdentityDocument){
if (isIdentityDocument) {

classes = res.getStringArray(R.array.example_identity_documents_classes);
names = res.getStringArray(R.array.example_identity_documents_names);

}else if(isMRO){
} else if (isVehicle) {

classes = res.getStringArray(R.array.example_mro_classes);
names = res.getStringArray(R.array.example_mro_names);
classes = res.getStringArray(R.array.example_vehicle_classes);
names = res.getStringArray(R.array.example_vehicle_names);

}else {
} else {

classes = res.getStringArray(R.array.example_others_classes);
names = res.getStringArray(R.array.example_others_names);
Expand All @@ -67,7 +69,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
public void onItemClick(int position) {

try {
if(mAdapter.getItemViewType(position) == 1) {
if (mAdapter.getItemViewType(position) == 1) {
Fragment fragment = null;
switch (mAdapter.getItemName(position)) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ public void onItemClick(int position) {
replaceFragment(fragment, "OTHERS_FRAGMENT");
break;

case "MRO":
case "Vehicle":

fragment = new OthersFragment();
Bundle mroArgs = new Bundle();
mroArgs.putBoolean(OthersFragment.MRO, true);
fragment.setArguments(mroArgs);
Bundle vehicleArgs = new Bundle();
vehicleArgs.putBoolean(OthersFragment.VEHICLE, true);
fragment.setArguments(vehicleArgs);
replaceFragment(fragment, "OTHERS_FRAGMENT");
break;

Expand Down
Loading

0 comments on commit ce4d4cc

Please sign in to comment.