This library provides a wrapper for the Scandit barcode scanner in Codename One apps.
Currently iOS and Android are supported. Call CodeScanner.isSupported()
to check runtime platform support.
-
Add the cn1-codescan-scandit.cn1lib to your project’s "lib" directory. (Or install the cn1-codescan-scandit library through Codename One Settings > Extensions).
-
Install the the Codename One Objective-C Bridge cn1lib in your project, as the scandit library depends on it. You can find this through the extensions section of Codename One Settings.
-
Download both the Android SDK and iOS SDK from Scandit. Version 5.5.2 recommended as that is the version we used when developing this module.
-
Copy the
ScanditBarcodeScanner.aar
file from the android SDK into the "native/android" directory of your project. -
Copy the
ScanditBarcodeScanner.framework
directory of the iOS SDK into the "native/ios" directory of your project. -
Refresh CN1libs in your project, and then do a clean and build on your project. (This is important! Don’t forget to clean and build).
-
Add the following to the
init()
method of your app:CodeScanner.install();
-
Run your project in the simulator at least once. The first time it runs, it will extract some files from the native SDK. If everything went OK, you should see a message saying "The ScanditSDK was successfully installed". You should now be ready to build for iOS and/or Android.
-
Download both the Android SDK and iOS SDK from Scandit. Version 5.5.2 recommended as that is the version we used when developing this module.
-
Copy the
ScanditBarcodeScanner.aar
file from the android SDK into the "native/android" directory. -
Copy the
ScanditBarcodeScanner.framework
directory of the iOS SDK into the "native/ios" directory. -
Build the project. (
ant jar
). If the build is successful, you’ll find the cn1lib at "dist/cn1-codescan-scandit.cn1lib"
See the Simple Demo App.
The library itself is licensed under BSD. The ScanditSDK carries a proprietary license, which is why it is not included in this distribution.