Skip to content

Commit bdcf27d

Browse files
author
build
committed
New version of Flutter CaptureSDK
1 parent 5d0bf54 commit bdcf27d

File tree

78 files changed

+2462
-2488
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+2462
-2488
lines changed

CHANGELOG.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.5.41]
6+
7+
### New
8+
9+
- 🚀 Flutter CaptureSDK is back to being public 🚀
10+
11+
### Improvements
12+
13+
- Upgrade to `Flutter SDK v3.3.0`
14+
- Upgrade to `Gradle 8.5.0`. See [this flutter.dev guide](https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply) for more information
15+
- Upgrade to [`iOS CaptureSDK v1.9.74`](https://github.com/SocketMobile/cocoapods-capturesdk)
16+
17+
### Fixed
18+
519
## [1.5.19] - 2024-09-24
620

721
### Fixed
@@ -27,10 +41,6 @@ All notable changes to this project will be documented in this file.
2741
- Update http package to 1.2.1 from [issue on Github](https://github.com/SocketMobile/capturesdk_flutter/issues/4)
2842
- Update the documentation to implement SocketCam on iOS
2943

30-
## Not available here from April 17th 2024
31-
32-
- SocketCam C860 is available through our [Developer Portal](https://www.socketmobile.com/developers/portal). For more information and how to access, please visit our page [about this new product](https://www.socketmobile.com/readers-accessories/product-families/socketcam).
33-
3444
## [1.4.46] - 2024-02-08
3545

3646
### Added

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright 2022 Socket Mobile Inc. All rights reserved.
3+
Copyright 2024 Socket Mobile Inc. All rights reserved.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 50 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,6 @@
1-
# ********************************************************
2-
# THIS REPOSITORY HAS BEEN MOVED BEHIND OUR [DEVELOPERS PORTAL](https://www.socketmobile.com/dev-portal/portal)
3-
# BUT PLEASE WATCH 👁️‍🗨️ ALL ACTIVITY IT AS WE REPORT THE README AND CHANGELOG HERE. YOU'LL BE NOTIFIED WITH:
4-
# - Bug fixes
5-
# - OS version update
6-
# - Support of new products
7-
# ********************************************************
1+
# Flutter CaptureSDK - Version 1.5.41
82

9-
# Flutter CaptureSDK 1.5.19
10-
11-
The repository has been relocated within the Socket Mobile [Developer Portal](https://www.socketmobile.com/developers/portal) to enhance camera scanning capabilities with the SocketCam C860.
12-
13-
It employs a high-performance decoder capable of swiftly reading damaged barcodes in various lighting conditions.
14-
15-
The new SocketCam C860 is provided to developers at no cost and requires no additional coding efforts if the application includes a UI trigger button.
16-
17-
Activation of the C860 is left to the application's end user, who can enable its use by purchasing a subscription.
18-
19-
It's important to note that the free version of our camera-based scanner, the SocketCam C820, remains accessible.
20-
21-
Both the C860 and C820 utilize the same APIs as our physical scanner products, ensuring a seamless transition between a camera-based scanner and a physical barcode scanner.
22-
23-
More documentation can be found [here](https://docs.socketmobile.com/captureflutter/en/latest/ "CaptureSDK Documentation").
24-
25-
For more information and how to access, please visit our page [about this new product](https://www.socketmobile.com/readers-accessories/product-families/socketcam).
26-
27-
On 1st of July 2024, there won't be any support for this repository and we will focus on the Flutter CaptureSDK hosted through our [DEVELOPERS PORTAL](https://www.socketmobile.com/dev-portal/portal).
3+
This is the Flutter CatureSDK for Socket Mobile's Capture library.
284

295
## Devices compatibility and CaptureSDK versions
306

@@ -45,10 +21,7 @@ Install the flutter package by adding the following to your `pubspec.yaml` file.
4521
```dart
4622
dependencies:
4723
...
48-
capturesdk_flutter:
49-
git:
50-
url: https://oauth2:<YOUR-AUTH-TOKEN-FROM-SOCKET-MOBILE-DEVELOPERS-PORTAL>@sdk.socketmobile.com/capture/flutter-capturesdk.git
51-
version: ^1.5.19
24+
capturesdk_flutter: ^1.5.41
5225
...
5326
```
5427

@@ -60,6 +33,20 @@ import 'package:capturesdk_flutter/capturesdk.dart';
6033

6134
For the rest of the things to add in your project, go to **[iOS](#getting-started-ios)** and **[Android](#getting-started-android)**.
6235

36+
## Getting started iOS (first section) - Important note
37+
38+
You will need to change three things in your app in order for it to work with iOS. First will need to update the `Podfile` in the `ios` directory of your app in order to be compatible with the version used in our SDK and the source of our iOS CaptureSDK Cocoapods private repository.
39+
40+
```ruby
41+
source 'https://github.com/CocoaPods/Specs.git'
42+
43+
platform :ios, '13.0' # minimum target requirement for CaptureSDK iOS
44+
45+
target 'MyProject' do
46+
....
47+
end
48+
```
49+
6350
## Getting started
6451

6552
Create a `Capture` instance with the line `Capture capture = Capture(logger);`. `logger` is an optional argument that is passed to `Capture` and can be helpful with tracing values and requests throughout the app, particularly in `Capture` and `HttpTransport` where the bulk of the Capture logic and requests are handled.
@@ -72,7 +59,7 @@ stat = 'handle: $response';
7259
mess = 'capture open success';
7360
```
7461

75-
`appInfo` is an instance of the `AppInfo` class and consists of the same parameters found in other Capture SDKs. See an example of `appInfo` below.
62+
`appInfo` is an instance of the `AppInfo` class and consists of the same parameters found in other CaptureSDKs. See an example of `appInfo` below.
7663

7764
```dart
7865
final appInfo = AppInfo(
@@ -85,7 +72,7 @@ final appInfo = AppInfo(
8572

8673
To generate app info, head to the [docs](https://www.socketmobile.com/developers/portal/application-details/appkey-registration) and follow the prompts to register your app and generate your `appInfo` credentials. See the important section at the end of the README for more information specific to Flutter.
8774

88-
Next, `_onCaptureEvent` is the callback passed to `open` that can handle the event notifications from the Capture SDK. Below are three important events to consider, which are accessible in the `CaptureEventIds` class.
75+
Next, `_onCaptureEvent` is the callback passed to `open` that can handle the event notifications from the CaptureSDK. Below are three important events to consider, which are accessible in the `CaptureEventIds` class.
8976

9077
`deviceArrival` is the event that is triggered when the scanner connects to your device.
9178

@@ -180,10 +167,10 @@ The response in `setProperty` does not contain a `value` property. You can acces
180167

181168
## Getting started iOS
182169

183-
You will need to change three things in your app in order for it to work with iOS. First will need to update the `Podfile` in the `ios` directory of your app in order to be compatible with the version used in our SDK and the source of our iOS CaptureSDK
170+
You will need to change three things in your app in order for it to work with iOS. First will need to update the `Podfile` in the `ios` directory of your app in order to be compatible with the version used in our SDK and the source of our iOS CaptureSDK Cocoapods private repository.
184171

185172
```ruby
186-
source "https://oauth2:<YOUR-AUTH-TOKEN-FROM-SOCKET-MOBILE-DEVELOPERS-PORTAL>@sdk.socketmobile.com/capture/cocoapods-repo.git"
173+
source 'https://github.com/CocoaPods/Specs.git'
187174

188175
platform :ios, '13.0'
189176

@@ -209,8 +196,6 @@ Second, go to `ios/Runner/Info.plist` and at the bottom, just above `</dict>`, i
209196
</array>
210197
```
211198

212-
If you do not do this, you will encounter an error saying `This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSBluetoothAlwaysUsageDescription key with a string value explaining to the user how the app uses this data.`. This is a bluetooth security measure, and to permit bluetooth access you will need to add the above entry in your `Info.plist` file. The other item related to `NSCameraUsageDescription` is to permit camera access in order to use SocketCam C820 and C860
213-
214199
For SocketCam C860 which is an enhanced version of SocketCam C820, you also need to add the following key to your `Info.plist`: **LSApplicationQueriesSchemes** (*Queried URL Schemes*) with a new item: **sktcompanion** (in lower case).
215200

216201
In order to use it you have to install [Socket Mobile Companion](https://apps.apple.com/app/socket-mobile-companion/id1175638950) on your device.
@@ -247,6 +232,35 @@ ALSO: The package name in `AndroidManifest.xml`, it needs to be both all lowerca
247232
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.yourpackagename">
248233
```
249234

235+
In the `MainActivity.java` file, register the CaptureSDK as a plugin:
236+
237+
```java
238+
package com.example.example; // Replace with your app's package name
239+
240+
import com.capturesdk_flutter.CaptureModule; // import CaptureModule Native Modules
241+
import io.flutter.embedding.android.FlutterActivity;
242+
import io.flutter.embedding.engine.FlutterEngine;
243+
244+
public class MainActivity extends FlutterActivity {
245+
@Override
246+
public void configureFlutterEngine(FlutterEngine flutterEngine) {
247+
flutterEngine.getPlugins().add(new CaptureModule(getApplicationContext())); // register CaptureSDK as a plugin here
248+
}
249+
}
250+
```
251+
252+
In your app's `builde.gradle` file add the 2 following options:
253+
254+
```java
255+
buildTypes {
256+
release {
257+
minifyEnabled false <------- to add
258+
shrinkResources false <------- to add
259+
signingConfig = signingConfigs.debug
260+
}
261+
}
262+
```
263+
250264
## Enable Start Capture Service on Android
251265

252266
You might also have to add the file `network_security_config.xml` file to `android/app/src/main/res/xml` in order to avoid a `clearText` permissions error. See the code below for the file.

0 commit comments

Comments
 (0)