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

Release/v6.6.0 #318

Merged
merged 4 commits into from
Mar 21, 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
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class MainActivity : AppCompatActivity(), RecognizerRunnerFragment.ScanningOverl
val overlayStrings = ReticleOverlayStrings.Builder(context).build()
val customStyle = R.style.CustomStyle
val reticleOverlay: BlinkIdOverlayView =
ReticleOverlayView(true, true, true, false, true, true, overlayStrings, customStyle)
ReticleOverlayView(true, true, true, false, true, true, overlayStrings, customStyle, true, true)
return BlinkIdOverlayController(overlaySettings, scanResultListener, reticleOverlay)
}

Expand Down
1 change: 1 addition & 0 deletions BlinkIDSample/BlinkID-CustomCombinedSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ android {
lintOptions {
checkReleaseBuilds false
}
namespace 'com.microblink.blinkid'
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.microblink.blinkid">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:name="com.microblink.BlinkIdSampleApp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -845,9 +845,9 @@ public void run() {
return;
}
if (torchOn) {
mIbTorch.setImageResource(R.drawable.mb_ic_flash_on_24dp);
mIbTorch.setImageResource(R.drawable.mb_ic_flash_on);
} else {
mIbTorch.setImageResource(R.drawable.mb_ic_flash_off_24dp);
mIbTorch.setImageResource(R.drawable.mb_ic_flash_off);
}
}
});
Expand Down Expand Up @@ -962,7 +962,7 @@ public void run() {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
mTorchItem = menu.add(Menu.NONE, TORCH_ID, Menu.NONE, R.string.mb_light);
mTorchItem.setIcon(R.drawable.mb_ic_flash_off_24dp);
mTorchItem.setIcon(R.drawable.mb_ic_flash_off);
mTorchItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
return true;
}
Expand All @@ -980,9 +980,9 @@ public void onOperationDone(boolean success) {
@Override
public void run() {
if (mTorchOn) {
item.setIcon(R.drawable.mb_ic_flash_on_24dp);
item.setIcon(R.drawable.mb_ic_flash_on);
} else {
item.setIcon(R.drawable.mb_ic_flash_off_24dp);
item.setIcon(R.drawable.mb_ic_flash_off);
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
style="@style/MB_top_button"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:src="@drawable/mb_ic_flash_off_24dp"
android:src="@drawable/mb_ic_flash_off"
tools:ignore="RtlHardcoded"/>
</RelativeLayout>

Expand Down
1 change: 1 addition & 0 deletions BlinkIDSample/BlinkID-CustomUISample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ android {
lintOptions {
checkReleaseBuilds false
}
namespace 'com.microblink.blinkid.demo'
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.microblink.blinkid.demo"
android:versionCode="1"
android:versionName="0.6.0" >

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,9 @@ public void onOperationDone(final boolean success) {
public void run() {
mTorchEnabled = !mTorchEnabled;
if (mTorchEnabled) {
mTorchButton.setImageResource(R.drawable.mb_ic_flash_on_24dp);
mTorchButton.setImageResource(R.drawable.mb_ic_flash_on);
} else {
mTorchButton.setImageResource(R.drawable.mb_ic_flash_off_24dp);
mTorchButton.setImageResource(R.drawable.mb_ic_flash_off);
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<ImageButton
android:id="@+id/defaultTorchButton"
style="@style/MB_top_button"
android:src="@drawable/mb_ic_flash_off_24dp"/>
android:src="@drawable/mb_ic_flash_off"/>

</LinearLayout>

Expand Down
1 change: 1 addition & 0 deletions BlinkIDSample/BlinkID-DirectApiSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ android {
lintOptions {
checkReleaseBuilds false
}
namespace 'com.microblink.blinkid.demo'
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.microblink.blinkid.demo">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.CAMERA" />
<!-- Required for capturing photos. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.microblink.blinkid.hardware.orientation.Orientation;
import com.microblink.blinkid.image.Image;
import com.microblink.blinkid.image.ImageBuilder;
import com.microblink.blinkid.image.InputImage;
import com.microblink.blinkid.recognition.RecognitionSuccessType;
import com.microblink.blinkid.util.Log;
import com.microblink.blinkid.view.recognition.ScanResultListener;
Expand Down Expand Up @@ -183,7 +184,7 @@ public void surfaceDestroyed(SurfaceHolder holder) {
public void onPreviewFrame(byte[] data, Camera camera) {
if (mRecognizerRunner.getCurrentState() == RecognizerRunner.State.READY) {
// create image
Image img = ImageBuilder.buildImageFromCamera1NV21Frame(data, mFrameWidth, mFrameHeight, Orientation.ORIENTATION_LANDSCAPE_RIGHT, null);
InputImage img = ImageBuilder.buildInputImageFromCamera1NV21Frame(data, mFrameWidth, mFrameHeight, Orientation.ORIENTATION_LANDSCAPE_RIGHT, null);
mRecognizerRunner.recognizeVideoImage(img, this);
} else {
// just ask for another frame
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import com.microblink.blinkid.entities.recognizers.RecognizerBundle;
import com.microblink.blinkid.hardware.orientation.Orientation;
import com.microblink.blinkid.image.ImageBuilder;
import com.microblink.blinkid.image.InputImage;
import com.microblink.blinkid.recognition.RecognitionSuccessType;
import com.microblink.blinkid.view.recognition.ScanResultListener;

Expand Down Expand Up @@ -102,7 +103,7 @@ public void onImageAvailable(ImageReader reader) {
if (img != null) {
if (mRecognizer.getCurrentState() == RecognizerRunner.State.READY) {
mImageBeingRecognized = img;
com.microblink.blinkid.image.Image image = ImageBuilder.buildImageFromCamera2Image(mImageBeingRecognized, Orientation.ORIENTATION_LANDSCAPE_RIGHT, null);
InputImage image = ImageBuilder.buildInputImageFromCamera2Image(mImageBeingRecognized, Orientation.ORIENTATION_LANDSCAPE_RIGHT, null);
Log.i(TAG, "Starting recognition");
mTimestamp = System.currentTimeMillis();
mRecognizer.recognizeVideoImage(image, Camera2Fragment.this);
Expand Down
1 change: 1 addition & 0 deletions BlinkIDSample/BlinkID-ImagesSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ android {
lintOptions {
checkReleaseBuilds false
}
namespace 'com.microblink.blinkid'
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.microblink.blinkid">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Expand Down
9 changes: 8 additions & 1 deletion BlinkIDSample/BlinkID-MinimalSampleAdvanced/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@ android {
lintOptions {
checkReleaseBuilds false
}

namespace 'com.microblink.blinkid'
kotlinOptions {
jvmTarget = '17'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.microblink.blinkid"
android:versionCode="1"
android:versionName="1">

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />

<uses-feature
android:name="android.hardware.camera"
Expand Down
1 change: 1 addition & 0 deletions BlinkIDSample/BlinkID-OverlaySample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ android {
lintOptions {
checkReleaseBuilds false
}
namespace 'com.microblink.blinkid'

}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.microblink.blinkid">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.CAMERA" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static BlinkIdOverlayController build(Context context, RecognizerBundle recogniz
// for ReticleOverlayView check attributes in R.styleable.BlinkIdReticleOverlay
int customStyle = R.style.CustomStyle;

BlinkIdOverlayView overlayView = new ReticleOverlayView(true, true, true, true, true, true, overlayStrings, customStyle);
BlinkIdOverlayView overlayView = new ReticleOverlayView(true, true, true, true, true, true, overlayStrings, customStyle, true, true);
return new BlinkIdOverlayController(overlaySettings, scanResultListener, overlayView);
}

Expand Down
11 changes: 10 additions & 1 deletion BlinkIDSample/BlinkID-aMinimalSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,23 @@ android {
lintOptions {
checkReleaseBuilds false
}
namespace 'com.microblink.blinkid'

kotlinOptions {
jvmTarget = '17'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}

dependencies {
implementation("com.microblink:blinkid:${rootProject.ext.blinkIdVersion}@aar") {
transitive = true
}

implementation 'androidx.activity:activity-ktx:1.7.0-alpha02'
implementation 'androidx.activity:activity-ktx:1.8.2'

// uncomment this to use custom LibBlinkID build
// implementation project(':LibBlinkID')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.microblink.blinkid"
android:versionCode="1"
android:versionName="1">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />

<uses-feature
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class BlinkIdSampleApp : Application() {
override fun onCreate() {
super.onCreate()
// obtain your licence at http://microblink.com/login or contact us at http://help.microblink.com
MicroblinkSDK.setLicenseFile("com.microblink.blinkid.mblic", this)
MicroblinkSDK.setLicenseKey("sRwCABZjb20ubWljcm9ibGluay5ibGlua2lkAGxleUpEY21WaGRHVmtUMjRpT2pFM01URXdNamd4TnpVeU5qQXNJa055WldGMFpXUkdiM0lpT2lKa1pHUXdOalpsWmkwMU9ESXpMVFF3TURndE9UUTRNQzAxTkRVNFlqQXhZVFUyWWpnaWZRPT0XQSGw4MlSYFI4GLBuTrvzIIXpisl+k7h/R9V8iUNw+edq0mlVNOnFqeHImrWXu8UbaKaxqggm6j+lxv818EBLdZ3EaqbZnHZxvOJ2r6SmLdfH8BKXU8OQkyr0VLU4be2TM2DmktEjagaIbkikp96uNyEKCx/3ag==", this)

// use optimised way for transferring RecognizerBundle between activities, while ensuring
// data does not get lost when Android restarts the scanning activity
Expand Down
1 change: 1 addition & 0 deletions BlinkIDSample/BlinkID_AllRecognizersSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ android {
lintOptions {
checkReleaseBuilds false
}
namespace 'com.microblink.blinkid'
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.microblink.blinkid"
android:versionCode="1"
android:versionName="0.6.0">

Expand Down
3 changes: 1 addition & 2 deletions BlinkIDSample/LibUtils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ android {
defaultConfig {
minSdkVersion 21
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
buildTypes {
debug {
Expand All @@ -23,6 +21,7 @@ android {
matchingFallbacks = ['release']
}
}
namespace 'com.microblink.blinkid.libutils'
}

dependencies {
Expand Down
5 changes: 3 additions & 2 deletions BlinkIDSample/LibUtils/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<manifest package="com.microblink.blinkid.libutils"
xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />

<application>
<activity android:name="com.microblink.blinkid.help.HelpActivity"/>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ protected BaseResultExtractorFactory createResultExtractorFactory() {
}

@Override
protected String getLicenceFilePath() {
return "com.microblink.blinkid.mblic";
protected String getLicenseKey() {
return "sRwCABZjb20ubWljcm9ibGluay5ibGlua2lkAGxleUpEY21WaGRHVmtUMjRpT2pFM01URXdNamd4TnpVeU5qQXNJa055WldGMFpXUkdiM0lpT2lKa1pHUXdOalpsWmkwMU9ESXpMVFF3TURndE9UUTRNQzAxTkRVNFlqQXhZVFUyWWpnaWZRPT0XQSGw4MlSYFI4GLBuTrvzIIXpisl+k7h/R9V8iUNw+edq0mlVNOnFqeHImrWXu8UbaKaxqggm6j+lxv818EBLdZ3EaqbZnHZxvOJ2r6SmLdfH8BKXU8OQkyr0VLU4be2TM2DmktEjagaIbkikp96uNyEKCx/3ag==";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public void onCreate() {
}

if (isRecognitionSupported) {
String licenseFilePath = getLicenceFilePath();
if (licenseFilePath != null) {
MicroblinkSDK.setLicenseFile(licenseFilePath, this);
String licenseKey = getLicenseKey();
if (licenseKey != null) {
MicroblinkSDK.setLicenseKey(licenseKey, this);
}
MicroblinkSDK.setIntentDataTransferMode(IntentDataTransferMode.PERSISTED_OPTIMISED);
}
Expand All @@ -50,6 +50,6 @@ public void onCreate() {

protected abstract BaseResultExtractorFactory createResultExtractorFactory();

protected abstract String getLicenceFilePath();
protected abstract String getLicenseKey();

}
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ private void extractMixedResults(BlinkIdMultiSideRecognizer.Result result) {
add(R.string.PPFatherName, result.getFathersName());
add(R.string.PPMotherName, result.getMothersName());
add(R.string.PPSex, result.getSex());
add(R.string.PPSponsor, result.getSponsor());
add(R.string.PPBloodType, result.getBloodType());

add(R.string.PPAddress, result.getAddress());
add(R.string.PPAdditionalAddressInformation, result.getAdditionalAddressInformation());
Expand Down Expand Up @@ -235,6 +237,8 @@ private void extractMixedNonEmptyResults(BlinkIdMultiSideRecognizer.Result resul
addIfNotEmpty(R.string.PPFatherName, result.getFathersName());
addIfNotEmpty(R.string.PPMotherName, result.getMothersName());
addIfNotEmpty(R.string.PPSex, result.getSex());
addIfNotEmpty(R.string.PPSponsor, result.getSponsor());
addIfNotEmpty(R.string.PPBloodType, result.getBloodType());

addIfNotEmpty(R.string.PPAddress, result.getAddress());
addIfNotEmpty(R.string.PPAdditionalAddressInformation, result.getAdditionalAddressInformation());
Expand Down Expand Up @@ -331,6 +335,8 @@ private void extractVisualResults(VizResult result) {
addIfNotEmpty(R.string.PPFatherName, result.getFathersName());
addIfNotEmpty(R.string.PPMotherName, result.getMothersName());
addIfNotEmpty(R.string.PPSex, result.getSex());
addIfNotEmpty(R.string.PPSponsor, result.getSponsor());
addIfNotEmpty(R.string.PPBloodType, result.getBloodType());

addIfNotEmpty(R.string.PPAddress, result.getAddress());
addIfNotEmpty(R.string.PPAdditionalAddressInformation, result.getAdditionalAddressInformation());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ private void extractMixedResults(BlinkIdSingleSideRecognizer.Result result) {
add(R.string.PPFatherName, result.getFathersName());
add(R.string.PPMotherName, result.getMothersName());
add(R.string.PPSex, result.getSex());
add(R.string.PPSponsor, result.getSponsor());
add(R.string.PPBloodType, result.getBloodType());

add(R.string.PPAddress, result.getAddress());
add(R.string.PPAdditionalAddressInformation, result.getAdditionalAddressInformation());
Expand Down Expand Up @@ -204,6 +206,8 @@ private void extractMixedNonEmptyResults(BlinkIdSingleSideRecognizer.Result resu
addIfNotEmpty(R.string.PPFatherName, result.getFathersName());
addIfNotEmpty(R.string.PPMotherName, result.getMothersName());
addIfNotEmpty(R.string.PPSex, result.getSex());
addIfNotEmpty(R.string.PPSponsor, result.getSponsor());
addIfNotEmpty(R.string.PPBloodType, result.getBloodType());

addIfNotEmpty(R.string.PPAddress, result.getAddress());
addIfNotEmpty(R.string.PPAdditionalAddressInformation, result.getAdditionalAddressInformation());
Expand Down Expand Up @@ -285,6 +289,8 @@ private void extractVisualResults(VizResult result) {
addIfNotEmpty(R.string.PPFatherName, result.getFathersName());
addIfNotEmpty(R.string.PPMotherName, result.getMothersName());
addIfNotEmpty(R.string.PPSex, result.getSex());
addIfNotEmpty(R.string.PPSponsor, result.getSponsor());
addIfNotEmpty(R.string.PPBloodType, result.getBloodType());

addIfNotEmpty(R.string.PPAddress, result.getAddress());
addIfNotEmpty(R.string.PPAdditionalAddressInformation, result.getAdditionalAddressInformation());
Expand Down
Loading