Skip to content

Commit ce9e35e

Browse files
authored
refactor(barcode-scanning): remove the rawBytes property (#252)
See #241 (comment)
1 parent 5c144d9 commit ce9e35e

File tree

5 files changed

+0
-17
lines changed

5 files changed

+0
-17
lines changed

.changeset/beige-walls-fold.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/barcode-scanning/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,6 @@ Remove all listeners for this plugin.
665665
| **`format`** | <code><a href="#barcodeformat">BarcodeFormat</a></code> | The barcode format. | 0.0.1 |
666666
| **`geoPoint`** | <code><a href="#barcodegeopoint">BarcodeGeoPoint</a></code> | GPS coordinates from a 'GEO:'. | 7.0.0 |
667667
| **`phone`** | <code><a href="#barcodephone">BarcodePhone</a></code> | Phone number info. | 7.0.0 |
668-
| **`rawBytes`** | <code>number[]</code> | The raw bytes of the barcode. | 7.1.0 |
669668
| **`rawValue`** | <code>string</code> | The barcode value in a machine readable format. This value is only available when the barcode is encoded in the UTF-8 character set. Otherwise, the `rawBytes` property should be used and this property will be an empty string. | 0.0.1 |
670669
| **`sms`** | <code><a href="#barcodesms">BarcodeSms</a></code> | A sms message from a 'SMS:'. | 7.0.0 |
671670
| **`urlBookmark`** | <code><a href="#barcodeurlbookmark">BarcodeUrlBookmark</a></code> | A URL and title from a 'MEBKM:'. | 7.0.0 |

packages/barcode-scanning/android/src/main/java/io/capawesome/capacitorjs/plugins/mlkit/barcodescanning/BarcodeScannerHelper.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ public static JSObject createBarcodeResultForBarcode(@NonNull Barcode barcode, @
6363
if (barcode.getPhone() != null) {
6464
result.put("phone", extractPhoneProperties(barcode.getPhone()));
6565
}
66-
result.put("rawBytes", convertByteArrayToJsonArray(barcode.getRawBytes()));
6766
result.put("rawValue", barcode.getRawValue() == null ? "" : barcode.getRawValue());
6867
if (barcode.getSms() != null) {
6968
result.put("sms", extractSmsProperties(barcode.getSms()));

packages/barcode-scanning/ios/Plugin/BarcodeScannerHelper.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,6 @@ public class BarcodeScannerHelper {
108108
if let phone = barcode.phone {
109109
result["phone"] = extractPhoneProperties(phone)
110110
}
111-
if let rawData = barcode.rawData {
112-
result["rawBytes"] = convertDataToJsonArray(rawData)
113-
}
114111
result["rawValue"] = barcode.rawValue ?? ""
115112
if let sms = barcode.sms {
116113
result["sms"] = extractSmsProperties(sms)

packages/barcode-scanning/src/definitions.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -498,13 +498,6 @@ export interface Barcode {
498498
* @since 7.0.0
499499
*/
500500
phone?: BarcodePhone;
501-
/**
502-
* The raw bytes of the barcode.
503-
*
504-
* @since 7.1.0
505-
* @example [67, 97, 112, 97, 99, 105, 116, 111, 114, 74, 83]
506-
*/
507-
rawBytes?: number[];
508501
/**
509502
* The barcode value in a machine readable format.
510503
*

0 commit comments

Comments
 (0)