Skip to content

Commit 681bf8e

Browse files
author
Jenkins
committed
8.2.349
1 parent d3564e3 commit 681bf8e

File tree

15 files changed

+104
-7
lines changed

15 files changed

+104
-7
lines changed

.dart_tool/package_config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
"languageVersion": "3.1"
159159
}
160160
],
161-
"generated": "2025-06-18T15:00:23.898723Z",
161+
"generated": "2025-07-24T20:01:21.609472Z",
162162
"generator": "pub",
163163
"generatorVersion": "3.7.2",
164164
"flutterRoot": "file:///Users/administratorregula/development/flutter",

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ android {
2828
}
2929

3030
dependencies {
31-
implementation('com.regula.documentreader:api:8.1.11551') {
31+
implementation('com.regula.documentreader:api:8.2.11679') {
3232
transitive = true
3333
}
3434

android/src/main/kotlin/com/regula/plugin/documentreader/BluetoothUtil.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,17 @@ fun requestEnableLocationService(activity: Activity) {
144144
val myIntent = Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS)
145145
startActivityForResult(activity, myIntent, INTENT_REQUEST_ENABLE_LOCATION)
146146
}
147+
148+
// btDevice functionality(temporary, will be reworked)
149+
150+
fun btDeviceRequestFlashing() {
151+
bluetooth?.requestFlashing()
152+
}
153+
154+
fun btDeviceRequestFlashingFullIR() {
155+
bluetooth?.requestFlashingFullIR()
156+
}
157+
158+
fun btDeviceRequestTurnOffAll() {
159+
bluetooth?.requestTurnOffAll()
160+
}

android/src/main/kotlin/com/regula/plugin/documentreader/Config.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ fun setProcessParams(processParams: ProcessParam, opts: JSONObject) = opts.forEa
137137
"generateDTCVC" -> processParams.generateDTCVC = v as Boolean
138138
"strictDLCategoryExpiry" -> processParams.strictDLCategoryExpiry = v as Boolean
139139
"generateAlpha2Codes" -> processParams.generateAlpha2Codes = v as Boolean
140+
"disableAuthResolutionFilter" -> processParams.disableAuthResolutionFilter = v as Boolean
140141
"measureSystem" -> processParams.measureSystem = v.toInt()
141142
"barcodeParserType" -> processParams.barcodeParserType = v.toInt()
142143
"perspectiveAngle" -> processParams.perspectiveAngle = v.toInt()
@@ -221,6 +222,7 @@ fun getProcessParams(processParams: ProcessParam) = mapOf(
221222
"generateDTCVC" to processParams.generateDTCVC,
222223
"strictDLCategoryExpiry" to processParams.strictDLCategoryExpiry,
223224
"generateAlpha2Codes" to processParams.generateAlpha2Codes,
225+
"disableAuthResolutionFilter" to processParams.disableAuthResolutionFilter,
224226
"measureSystem" to processParams.measureSystem,
225227
"barcodeParserType" to processParams.barcodeParserType,
226228
"perspectiveAngle" to processParams.perspectiveAngle,
@@ -316,6 +318,7 @@ fun setCustomization(customization: ParamsCustomization, opts: JSONObject) = opt
316318
"torchButtonOnImage" -> editor.setTorchImageOn(v.toDrawable())
317319
"torchButtonOffImage" -> editor.setTorchImageOff(v.toDrawable())
318320
"livenessAnimationImage" -> editor.setLivenessAnimationImage(v.toDrawable())
321+
"multipageButtonImage" -> editor.setMultipageButtonImage(v.toDrawable())
319322
"helpAnimationImageMatrix" -> editor.setHelpAnimationImageMatrix(matrixFromJSON(v as JSONArray?)).setHelpAnimationImageScaleType(ImageView.ScaleType.MATRIX)
320323
"multipageAnimationFrontImageMatrix" -> editor.setMultipageAnimationFrontImageMatrix(matrixFromJSON(v as JSONArray?)).setMultipageAnimationFrontImageScaleType(ImageView.ScaleType.MATRIX)
321324
"multipageAnimationBackImageMatrix" -> editor.setMultipageAnimationBackImageMatrix(matrixFromJSON(v as JSONArray?)).setMultipageAnimationBackImageScaleType(ImageView.ScaleType.MATRIX)
@@ -401,6 +404,7 @@ fun getCustomization(customization: ParamsCustomization) = mapOf(
401404
"torchButtonOnImage" to customization.torchImageOnDrawable.toBase64(),
402405
"torchButtonOffImage" to customization.torchImageOffDrawable.toBase64(),
403406
"livenessAnimationImage" to customization.livenessAnimationImage.toBase64(),
407+
"multipageButtonImage" to customization.multipageButtonDrawable.toBase64(),
404408
"helpAnimationImageMatrix" to generateMatrix(customization.helpAnimationImageMatrix),
405409
"multipageAnimationFrontImageMatrix" to generateMatrix(customization.multipageAnimationFrontImageMatrix),
406410
"multipageAnimationBackImageMatrix" to generateMatrix(customization.multipageAnimationBackImageMatrix),

android/src/main/kotlin/com/regula/plugin/documentreader/Main.kt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,16 @@ import com.regula.plugin.documentreader.Convert.toByteArray
4747
fun methodCall(method: String, callback: (Any?) -> Unit): Any = when (method) {
4848
"getDocumentReaderIsReady" -> getDocumentReaderIsReady(callback)
4949
"getDocumentReaderStatus" -> getDocumentReaderStatus(callback)
50+
"getRfidSessionStatus" -> getRfidSessionStatus(callback)
51+
"setRfidSessionStatus" -> setRfidSessionStatus(argsNullable(0))
5052
"getTag" -> getTag(callback)
5153
"setTag" -> setTag(argsNullable(0))
5254
"getTenant" -> getTenant(callback)
5355
"setTenant" -> setTenant(argsNullable(0))
5456
"getEnv" -> getEnv(callback)
5557
"setEnv" -> setEnv(argsNullable(0))
58+
"getLocale" -> getLocale(callback)
59+
"setLocale" -> setLocale(argsNullable(0))
5660
"getFunctionality" -> getFunctionality(callback)
5761
"setFunctionality" -> setFunctionality(args(0))
5862
"getProcessParams" -> getProcessParams(callback)
@@ -87,6 +91,9 @@ fun methodCall(method: String, callback: (Any?) -> Unit): Any = when (method) {
8791
"clearPKDCertificates" -> clearPKDCertificates()
8892
"startNewSession" -> startNewSession()
8993
"connectBluetoothDevice" -> connectBluetoothDevice(callback)
94+
"btDeviceRequestFlashing" -> btDeviceRequestFlashing()
95+
"btDeviceRequestFlashingFullIR" -> btDeviceRequestFlashingFullIR()
96+
"btDeviceRequestTurnOffAll" -> btDeviceRequestTurnOffAll()
9097
"setLocalizationDictionary" -> setLocalizationDictionary(args(0))
9198
"getLicense" -> getLicense(callback)
9299
"getAvailableScenarios" -> getAvailableScenarios(callback)
@@ -139,6 +146,10 @@ fun getDocumentReaderIsReady(callback: Callback) = callback(Instance().isReady)
139146

140147
fun getDocumentReaderStatus(callback: Callback) = callback(Instance().status)
141148

149+
fun getRfidSessionStatus(iosOnly: Callback) = iosOnly(null)
150+
151+
fun setRfidSessionStatus(iosOnly: String?) = Unit
152+
142153
fun getTag(callback: Callback) = callback(Instance().tag)
143154

144155
fun setTag(tag: String?) = tag.let { Instance().tag = it }
@@ -151,6 +162,10 @@ fun getEnv(callback: Callback) = callback(Instance().env)
151162

152163
fun setEnv(tag: String?) = tag.let { Instance().env = it }
153164

165+
fun getLocale(callback: Callback) = callback(Instance().locale)
166+
167+
fun setLocale(locale: String?) = locale.let { Instance().locale = it }
168+
154169
fun getFunctionality(callback: Callback) = callback(getFunctionality(Instance().functionality()))
155170

156171
fun setFunctionality(functionality: JSONObject) = setFunctionality(Instance().functionality(), functionality)

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies:
1414
sdk: flutter
1515
flutter_document_reader_api:
1616
path: ../
17-
flutter_document_reader_core_fullauthrfid: 8.1.426
17+
flutter_document_reader_core_fullauthrfid: 8.2.561
1818
flutter_document_reader_btdevice: 7.6.17
1919
cupertino_icons: ^1.0.8
2020

ios/Classes/RGLWConfig.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ +(void)setProcessParams:(NSDictionary*)options :(RGLProcessParams*)processParams
184184
if (options[@"generateDTCVC"]) processParams.generateDTCVC = options[@"generateDTCVC"];
185185
if (options[@"strictDLCategoryExpiry"]) processParams.strictDLCategoryExpiry = options[@"strictDLCategoryExpiry"];
186186
if (options[@"generateAlpha2Codes"]) processParams.generateAlpha2Codes = options[@"generateAlpha2Codes"];
187+
if (options[@"disableAuthResolutionFilter"]) processParams.disableAuthResolutionFilter = options[@"disableAuthResolutionFilter"];
187188

188189
// Int
189190
if([options valueForKey:@"measureSystem"] != nil)
@@ -314,6 +315,7 @@ +(NSDictionary*)getProcessParams:(RGLProcessParams*)processParams {
314315
result[@"generateDTCVC"] = processParams.generateDTCVC;
315316
result[@"strictDLCategoryExpiry"] = processParams.strictDLCategoryExpiry;
316317
result[@"generateAlpha2Codes"] = processParams.generateAlpha2Codes;
318+
result[@"disableAuthResolutionFilter"] = processParams.disableAuthResolutionFilter;
317319

318320
// Int
319321
result[@"measureSystem"] = [NSNumber numberWithInteger:processParams.measureSystem];
@@ -475,6 +477,7 @@ +(void)setCustomization:(NSDictionary*)options :(RGLCustomization*)customization
475477
customization.torchButtonOffImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"torchButtonOffImage"]];
476478
if([options valueForKey:@"livenessAnimationImage"] != nil)
477479
customization.livenessAnimationImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"livenessAnimationImage"]];
480+
if(options[@"multipageButtonImage"]) customization.multipageButtonImage = [RGLWJSONConstructor imageWithBase64:options[@"multipageButtonImage"]];
478481

479482
// Font
480483
if([options valueForKey:@"statusTextFont"] != nil)
@@ -576,6 +579,7 @@ +(NSDictionary*)getCustomization:(RGLCustomization*)customization {
576579
result[@"torchButtonOnImage"] = [RGLWJSONConstructor base64WithImage:customization.torchButtonOnImage];
577580
result[@"torchButtonOffImage"] = [RGLWJSONConstructor base64WithImage:customization.torchButtonOffImage];
578581
result[@"livenessAnimationImage"] = [RGLWJSONConstructor base64WithImage:customization.livenessAnimationImage];
582+
result[@"multipageButtonImage"] = [RGLWJSONConstructor base64WithImage:customization.multipageButtonImage];
579583

580584
// Font
581585
result[@"statusTextFont"] = [self generateUIFont:customization.statusTextFont];

ios/Classes/RGLWMain.m

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ +(void)methodCall:(NSString*)method :(NSArray*)args :(RGLWCallback)callback :(RG
1616
@"setTenant": ^{ [self setTenant :args[0]]; },
1717
@"getEnv": ^{ [self getEnv :callback]; },
1818
@"setEnv": ^{ [self setEnv :args[0]]; },
19+
@"getLocale": ^{ [self getLocale :callback]; },
20+
@"setLocale": ^{ [self setLocale :args[0]]; },
1921
@"getFunctionality": ^{ [self getFunctionality :callback]; },
2022
@"setFunctionality": ^{ [self setFunctionality :args[0]]; },
2123
@"getProcessParams": ^{ [self getProcessParams :callback]; },
@@ -50,6 +52,9 @@ +(void)methodCall:(NSString*)method :(NSArray*)args :(RGLWCallback)callback :(RG
5052
@"clearPKDCertificates": ^{ [self clearPKDCertificates]; },
5153
@"startNewSession": ^{ [self startNewSession]; },
5254
@"connectBluetoothDevice": ^{ [self connectBluetoothDevice :args[0] :callback]; },
55+
@"btDeviceRequestFlashing": ^{ /* android only */ },
56+
@"btDeviceRequestFlashingFullIR": ^{ /* android only */ },
57+
@"btDeviceRequestTurnOffAll": ^{ /* android only */ },
5358
@"setLocalizationDictionary": ^{ [self setLocalizationDictionary :args[0]]; },
5459
@"getLicense": ^{ [self getLicense :callback]; },
5560
@"getAvailableScenarios": ^{ [self getAvailableScenarios :callback]; },
@@ -126,6 +131,14 @@ +(void)setEnv:(NSString*)tag {
126131
[RGLDocReader.shared setEnv:tag];
127132
}
128133

134+
+(void)getLocale:(RGLWCallback)callback {
135+
callback([RGLDocReader.shared languageLocaleCode]);
136+
}
137+
138+
+(void)setLocale:(NSString*)locale {
139+
[RGLDocReader.shared setLanguageLocaleCode:locale];
140+
}
141+
129142
+(void)getFunctionality:(RGLWCallback)callback {
130143
callback([RGLWJSONConstructor dictToString: [RGLWConfig getFunctionality: RGLDocReader.shared.functionality]]);
131144
}

ios/flutter_document_reader_api.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'flutter_document_reader_api'
3-
s.version = '8.1.306'
3+
s.version = '8.2.349'
44
s.summary = 'A new flutter plugin project.'
55
s.description = <<-DESC
66
A new flutter plugin project.
@@ -13,7 +13,7 @@ A new flutter plugin project.
1313
s.public_header_files = 'Classes/**/*.h'
1414
s.dependency 'Flutter'
1515
s.platform = :ios, '13.0'
16-
s.dependency 'DocumentReader', '8.1.4772'
16+
s.dependency 'DocumentReader', '8.2.4934'
1717
# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
1818
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
1919
end

lib/flutter_document_reader_api.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,15 @@ class DocumentReader {
226226
_setEnv(val);
227227
}
228228

229+
/// Custom language locale code of DocumentReaderSDK.
230+
/// If empty or doesn't exist - app language is used. Format "en-US" or "en".
231+
String? get locale => _locale;
232+
String? _locale;
233+
set locale(String? val) {
234+
_locale = val;
235+
_setLocale(val);
236+
}
237+
229238
/// A localization dictionary to override default localization logic.
230239
/// Allows to replace any string of DocumentReader SDK with an arbitrary string.
231240
///
@@ -531,6 +540,7 @@ class DocumentReader {
531540
_tag = await _getTag();
532541
_tenant = await _getTenant();
533542
_env = await _getEnv();
543+
_locale = await _getLocale();
534544
if (Platform.isIOS) _rfidSessionStatus = await _getRfidSessionStatus();
535545
_functionality = await _getFunctionality();
536546
_processParams = await _getProcessParams();
@@ -609,6 +619,14 @@ class DocumentReader {
609619
_bridge.invokeMethod("setEnv", [tag]);
610620
}
611621

622+
Future<String?> _getLocale() async {
623+
return await _bridge.invokeMethod("getLocale", []);
624+
}
625+
626+
void _setLocale(String? locale) {
627+
_bridge.invokeMethod("setLocale", [locale]);
628+
}
629+
612630
void _setLocalizationDictionary(Map<String, String>? dictionary) {
613631
_bridge.invokeMethod("setLocalizationDictionary", [dictionary]);
614632
}

0 commit comments

Comments
 (0)