Skip to content
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
6 changes: 6 additions & 0 deletions plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ Note: iOS supports all formats except `MAXICODE` and `UPC_EAN_EXTENSION` - using
Interface defining the contract for a plugin capable of scanning barcodes.
Requires implementation of the scanBarcode method, which initiates a barcode scan with given options.

Starting in Android targetSdk 36, the scanOrientation parameter has no effect for large screens (e.g. tablets) on Android 16 and higher.
You may opt-out of this behavior in your app by adding `<property android:name="android.window.PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY" android:value="true" />` to your `AndroidManifest.xml` inside `<application>` or `<activity>`.
Keep in mind though that this opt-out is temporary and will no longer work for Android 17. Android discourages setting specific orientations for large screens.
Regular Android phones are unaffected by this change.
For more information check the Android docs at https://developer.android.com/about/versions/16/behavior-changes-16#adaptive-layouts

### scanBarcode(...)

```typescript
Expand Down
7 changes: 7 additions & 0 deletions plugin/src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ export type CapacitorBarcodeScannerOptions = {
/**
* Interface defining the contract for a plugin capable of scanning barcodes.
* Requires implementation of the scanBarcode method, which initiates a barcode scan with given options.
*
* Starting in Android targetSdk 36, the scanOrientation parameter has no effect for large screens (e.g. tablets) on Android 16 and higher.
* You may opt-out of this behavior in your app by adding `<property android:name="android.window.PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY" android:value="true" />` to your `AndroidManifest.xml` inside `<application>` or `<activity>`.
* Keep in mind though that this opt-out is temporary and will no longer work for Android 17. Android discourages setting specific orientations for large screens.
* Regular Android phones are unaffected by this change.
* For more information check the Android docs at https://developer.android.com/about/versions/16/behavior-changes-16#adaptive-layouts
*
*/
export interface CapacitorBarcodeScannerPlugin {
scanBarcode(options: CapacitorBarcodeScannerOptions): Promise<CapacitorBarcodeScannerScanResult>;
Expand Down
Loading