Skip to content

Commit

Permalink
Updated Android SDK to v2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
i1E committed Apr 8, 2016
1 parent 8189de2 commit ad4061e
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 28 deletions.
2 changes: 1 addition & 1 deletion BlinkID/src/android/blinkid-android
Submodule blinkid-android updated 63 files
+1 −1 .travis.yml
+3 −2 BlinkIDDemo/BlinkIDDemo/build.gradle
+19 −6 BlinkIDDemo/BlinkIDDemo/src/main/java/com/microblink/blinkid/MenuActivity.java
+3 −2 BlinkIDDemo/BlinkIDDemoCustomSegmentScan/build.gradle
+18 −5 BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/java/com/microblink/blinkid/FullScreenOCR.java
+172 −22 BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/java/com/microblink/blinkid/MainActivity.java
+0 −5 BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/java/com/microblink/blinkid/ScanActivity.java
+ BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/drawable-hdpi/icon_exit.png
+ BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/drawable-hdpi/icon_exit_selected.png
+ BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/drawable-hdpi/icon_flashlight.png
+ BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/drawable-hdpi/icon_flashlight_selected.png
+ BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/drawable-hdpi/icon_help.png
+ BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/drawable-hdpi/icon_help_selected.png
+ BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/drawable-ldpi/icon_exit.png
+ BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/drawable-ldpi/icon_exit_selected.png
+ BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/drawable-ldpi/icon_flashlight.png
+ BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/drawable-ldpi/icon_flashlight_selected.png
+ BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/drawable-ldpi/icon_help.png
+ BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/drawable-ldpi/icon_help_selected.png
+ BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/drawable-xhdpi/icon_exit.png
+ BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/drawable-xhdpi/icon_exit_selected.png
+ BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/drawable-xhdpi/icon_flashlight.png
+ BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/drawable-xhdpi/icon_flashlight_selected.png
+ BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/drawable-xhdpi/icon_help.png
+ BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/drawable-xhdpi/icon_help_selected.png
+42 −31 BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/layout/activity_main.xml
+23 −15 BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/layout/overlay.xml
+1 −0 BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/values/dimens.xml
+10 −0 BlinkIDDemo/BlinkIDDemoCustomSegmentScan/src/main/res/values/strings.xml
+3 −2 BlinkIDDemo/BlinkIDDemoCustomUI/build.gradle
+19 −17 BlinkIDDemo/BlinkIDDemoCustomUI/src/main/java/com/microblink/blinkid/demo/customui/MyScanActivity.java
+3 −2 BlinkIDDemo/BlinkIDDetectorDemo/build.gradle
+17 −13 BlinkIDDemo/BlinkIDDetectorDemo/src/main/java/com/microblink/blinkid/DetectorActivity.java
+3 −2 BlinkIDDemo/BlinkIDDirectApiDemo/build.gradle
+29 −5 BlinkIDDemo/BlinkIDDirectApiDemo/src/main/AndroidManifest.xml
+0 −168 BlinkIDDemo/BlinkIDDirectApiDemo/src/main/java/com/microblink/blinkid/demo/MainActivity.java
+174 −0 BlinkIDDemo/BlinkIDDirectApiDemo/src/main/java/com/microblink/blinkid/demo/MenuActivity.java
+230 −0 BlinkIDDemo/BlinkIDDirectApiDemo/src/main/java/com/microblink/blinkid/demo/customcamera/Camera1Activity.java
+78 −0 ...BlinkIDDirectApiDemo/src/main/java/com/microblink/blinkid/demo/customcamera/camera2/AutoFitTextureView.java
+22 −0 ...mo/BlinkIDDirectApiDemo/src/main/java/com/microblink/blinkid/demo/customcamera/camera2/Camera2Activity.java
+743 −0 ...mo/BlinkIDDirectApiDemo/src/main/java/com/microblink/blinkid/demo/customcamera/camera2/Camera2Fragment.java
+244 −0 BlinkIDDemo/BlinkIDDirectApiDemo/src/main/java/com/microblink/blinkid/demo/imagescan/ScanImageActivity.java
+19 −0 BlinkIDDemo/BlinkIDDirectApiDemo/src/main/res/layout/activity_camera1.xml
+8 −0 BlinkIDDemo/BlinkIDDirectApiDemo/src/main/res/layout/activity_camera2.xml
+0 −19 BlinkIDDemo/BlinkIDDirectApiDemo/src/main/res/layout/activity_main.xml
+39 −0 BlinkIDDemo/BlinkIDDirectApiDemo/src/main/res/layout/activity_menu.xml
+42 −0 BlinkIDDemo/BlinkIDDirectApiDemo/src/main/res/layout/activity_scan_image.xml
+13 −0 BlinkIDDemo/BlinkIDDirectApiDemo/src/main/res/layout/fragment_camera2.xml
+3 −2 BlinkIDDemo/BlinkIDDirectApiDemo/src/main/res/values/strings.xml
+11 −0 BlinkIDDemo/BlinkIDDirectApiDemo/src/main/res/values/styles.xml
+3 −2 BlinkIDDemo/LibResult/build.gradle
+4 −4 BlinkIDDemo/LibResult/src/main/java/com/microblink/libresult/ResultFragment.java
+20 −17 BlinkIDDemo/LibResult/src/main/java/com/microblink/libresult/extract/EUDLRecognitionResultExtractor.java
+1 −0 BlinkIDDemo/LibResult/src/main/res/values/resultActivityStrings.xml
+2 −3 BlinkIDDemo/build.gradle
+1 −1 BlinkIDDemo/gradle/wrapper/gradle-wrapper.properties
+ LibRecognizer-javadoc.jar
+ LibRecognizer.aar
+273 −36 README.md
+29 −0 Release notes.md
+1 −1 builtFromCommit.txt
+1 −3 installToLocalMaven.sh
+48 −0 pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
import com.microblink.recognizers.blinkid.malaysia.MyKadRecognizerSettings;
import com.microblink.recognizers.blinkid.mrtd.MRTDRecognitionResult;
import com.microblink.recognizers.blinkid.mrtd.MRTDRecognizerSettings;
import com.microblink.recognizers.blinkid.ukdl.UKDLRecognitionResult;
import com.microblink.recognizers.blinkid.ukdl.UKDLRecognizerSettings;
import com.microblink.recognizers.blinkid.eudl.EUDLCountry;
import com.microblink.recognizers.blinkid.eudl.EUDLRecognitionResult;
import com.microblink.recognizers.blinkid.eudl.EUDLRecognizerSettings;
import com.microblink.recognizers.settings.RecognitionSettings;
import com.microblink.recognizers.settings.RecognizerSettings;
import com.microblink.results.barcode.BarcodeDetailedData;
Expand Down Expand Up @@ -218,9 +219,11 @@ private MRTDRecognizerSettings buildMrtdSettings() {
return mrtd;
}

private UKDLRecognizerSettings buildUkdlSettings() {
// prepare settings for United Kingdom Driver's Licence recognizer
UKDLRecognizerSettings ukdl = new UKDLRecognizerSettings();
private EUDLRecognizerSettings buildUkdlSettings() {
// To specify we want to perform EUDL (EU Driver's License) recognition,
// prepare settings for EUDL recognizer. Pass country as parameter to EUDLRecognizerSettings
// constructor. Here we choose UK.
EUDLRecognizerSettings ukdl = new EUDLRecognizerSettings(EUDLCountry.EUDL_COUNTRY_UK);
// Defines if issue date should be extracted. Default is true
ukdl.setExtractIssueDate(true);
// Defines if expiry date should be extracted. Default is true.
Expand Down Expand Up @@ -364,8 +367,8 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
resultsList.put(buildMRTDResult((MRTDRecognitionResult) res));
} else if (res instanceof USDLScanResult) { // check if scan result is result of US Driver's Licence recognizer
resultsList.put(buildUSDLResult((USDLScanResult) res));
} else if (res instanceof UKDLRecognitionResult) { // check if scan result is result of UKDL recognizer
resultsList.put(buildUKDLResult((UKDLRecognitionResult) res));
} else if (res instanceof EUDLRecognitionResult) { // check if scan result is result of EUDL recognizer
resultsList.put(buildUKDLResult((EUDLRecognitionResult) res));
} else if (res instanceof MyKadRecognitionResult) { // check if scan result is result of MyKad recognizer
resultsList.put(buildMyKadResult((MyKadRecognitionResult) res));
}
Expand Down Expand Up @@ -452,7 +455,7 @@ private JSONObject buildMyKadResult(MyKadRecognitionResult res) throws JSONExcep
return buildKeyValueResult(res, MYKAD_RESULT_TYPE);
}

private JSONObject buildUKDLResult(UKDLRecognitionResult res) throws JSONException{
private JSONObject buildUKDLResult(EUDLRecognitionResult res) throws JSONException{
return buildKeyValueResult(res, UKDL_RESULT_TYPE);
}

Expand Down
3 changes: 3 additions & 0 deletions Release notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 1.0.2
- updated [Android SDK](https://github.com/BlinkID/blinkid-android) to v2.5.0

## 1.0.1
- updated [Android SDK](https://github.com/BlinkID/blinkid-android) to v2.2.0

Expand Down
38 changes: 19 additions & 19 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var app = {
* Use these scanner types
* Available: "PDF417", "USDL", "Bar Decoder", "Zxing", "MRTD", "UKDL", "MyKad"
*/
var types = ["PDF417", "UKDL", "MRTD"];
var types = ["PDF417", "UKDL", "MRTD"];

// Note that each platform requires its own license key

Expand All @@ -65,23 +65,23 @@ var app = {
scanButton.addEventListener('click', function() {
cordova.plugins.blinkIdScanner.scan(

// Register the callback handler
// Register the callback handler
function callback(scanningResult) {

// handle cancelled scanning
if (scanningResult.cancelled == true) {
resultDiv.innerHTML = "Cancelled!";
return;
}
// Obtain list of recognizer results
var resultList = scanningResult.resultList;
// Iterate through all results
for (var i = 0; i < resultList.length; i++) {
resultDiv.innerHTML = "Cancelled!";
return;
}
// Obtain list of recognizer results
var resultList = scanningResult.resultList;
// Iterate through all results
for (var i = 0; i < resultList.length; i++) {

// Get individual resilt
var recognizerResult = resultList[i];
var recognizerResult = resultList[i];
if (recognizerResult.resultType == "Barcode result") {
// handle Barcode scanning result

Expand Down Expand Up @@ -123,7 +123,7 @@ var app = {

} else if (recognizerResult.resultType == "MRTD result") {

var fields = recognizerResult.fields;
var fields = recognizerResult.fields;

resultDiv.innerHTML = /** Personal information */
"Family name: " + fields[kPPmrtdPrimaryId] + "; " +
Expand All @@ -139,8 +139,8 @@ var app = {
"Opt1: " + fields[kPPmrtdOpt1] + "; " +
"Opt2: " + fields[kPPmrtdOpt2] + "; ";

} else if (recognizerResult.resultType == "UKDL result") {
} else if (recognizerResult.resultType == "UKDL result") {
var fields = recognizerResult.fields;

resultDiv.innerHTML = /** Personal information */
Expand All @@ -153,8 +153,8 @@ var app = {
"First name: " + fields[kPPukdlFirstName] + "; " +
"Last name: " + fields[kPPukdlLastName] + "; ";

} else if (recognizerResult.resultType == "MyKad result") {
} else if (recognizerResult.resultType == "MyKad result") {
var fields = recognizerResult.fields;

resultDiv.innerHTML = /** Personal information */
Expand All @@ -165,8 +165,8 @@ var app = {
"Full Name: " + fields[kPPmyKadFullName] + "; " +
"Religion: " + fields[kPPmyKadReligion] + "; " +
"Sex: " + fields[kPPmyKadSex] + "; ";
}
}
}
}
},

// Register the error callback
Expand Down

0 comments on commit ad4061e

Please sign in to comment.