From 9513fd7dbaf6140d824d8b870655dc8ada258df0 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Mon, 27 Jul 2026 22:30:55 +0200 Subject: [PATCH] feat(anyline): add setDefaultScanStartPlatformOptions and note legacy API deprecation (#5207) --- .../plugins/anyline/index.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/@awesome-cordova-plugins/plugins/anyline/index.ts b/src/@awesome-cordova-plugins/plugins/anyline/index.ts index b97713ec4..7082f9220 100644 --- a/src/@awesome-cordova-plugins/plugins/anyline/index.ts +++ b/src/@awesome-cordova-plugins/plugins/anyline/index.ts @@ -9,6 +9,10 @@ export interface AnylineConfig { * @name Anyline * @description * Anyline provides an easy-to-use SDK for applications to enable Optical Character Recognition (OCR) on mobile devices. + * + * @deprecated since v56.0.0. This legacy `AnylineSDK` API remains functional but upstream recommends migrating to the + * new `AnylineInfinityPlugin` API (exposed natively as `window.AnylineInfinity`), which is not covered by this wrapper. + * See https://documentation.anyline.com/cordova-plugin-component/latest/infinity-plugins/upgrade-guide.html * @usage * ```typescript * import { Anyline } from '@awesome-cordova-plugins/anyline/ngx'; @@ -59,4 +63,17 @@ export class Anyline extends AwesomeCordovaNativePlugin { scan(config: AnylineConfig): Promise { return; } + + /** + * Sets platform-specific scanning options, such as selecting the camera API on Android + * (CameraX vs Camera1) or managing camera permission handling. Must be called before `scan`. + * + * @param scanStartPlatformOptionsString {string} A JSON-stringified object of platform-specific attributes, + * e.g. `JSON.stringify({ androidScanViewAttributes: { useCameraX: false } })` + * @returns {Promise} Returns a promise that resolves when the options have been set + */ + @Cordova() + setDefaultScanStartPlatformOptions(scanStartPlatformOptionsString: string): Promise { + return; + } }