Android Studio
Install Android Studio
Install Datalogic SDK Add-on
From Android Studio launch window, click on Configure > SDK Manager to open Android SDK Manager.
Select the tab SDK Update Sites and click the (plus) icon on the right-side toolbar.
In the new window insert the following URL, optionally a name and the press OK.
Now select the tab SDK Platforms in the Android SDK settings panel and check the checkbox on the bottom right Show Package Details.
Under each displayed section, corresponding to the Android releases available, Datalogic SDK v1 Add-on should appear. Choose and install the development kit in accordance with your Android platform of choice.
To install it, check Datalogic SDK v1 checkbox and a small icon on the left should appear.
See Platform version for further details
Click on the button Apply to install the selected packages and confirm the choice in the next dialog.
Now, read and understand the corresponding End-User License Agreement (EULA) available in the next window. Accept it, in order to install Datalogic Android SDK.
Once the installation is complete, the Status of the Datalogic SDK v1 Add-on changes from Not installed to Installed. You are now ready to start developing applications compatible with Datalogic devices.
Use Datalogic SDK
When it comes to develop new applications and take advantage of Datalogic devices, simply follow these guided steps.Create new applications
When creating a new project choose Start a new Android Studio project from the Android Studio Welcome screen.
When creating a new project choose the most correct Minimum SDK API level and press Next.
The wizard will guide through the creation of a new application.
With a choice of basic layout and Activity styles.
Complete the guided wizard and let the IDE settle down. A generic Android application, runnable on all Android devices, is now ready for development.
Compile projects
With the previous steps, you have simply prepared a basic environment for a generic Android application. Through the next steps, instead, your basic application will leverage on custom Datalogic SDK functionalities and will be compiled to be compatible with a Datalogic device.In order to gain access to the SDK functionalities, applications need to be compiled with the right Datalogic SDK environment. To do so, right click on app folder under the Android project module, then select Open Module Settings.
In the following window point to Project Structure > Modules app tab Properties and change the Compile Sdk Version accordingly, matching the right Datalogic SDK with the API level in use. In the showed example we are compiling apps with the latest Android 6.0 API level, meaning we need to select a corresponding Datalogic SDK matching the same level (rember to download and install the matching Datalogic Add-on). Confirm the choice by pressing OK.
Android Studio will now switch to the Datalogic SDK v1, allowing you to develop and extend your app to the Datalogic Android APIs. Take a look at the API reference and available examples.
Gradle scripts
Compiling an application with the Datalogic SDK it is a matter of matching and using the most correct configuration of the build.gradle file associated to the application.In the following example we are matching the targetSdkVersion with a corresponding level of Datalogic SDK Add-on (the trailing number is exactly 23):
If you are pointing to a different target version, install the matching Datalogic SDK v1 Add-on through the Android SDK Manager.
Android application manifest
Android applications must have generally an App Manifest (AndroidManifest.xml), where all information about the application itself are exposed. Datalogic device compatible apps, relying on Datalogic SDK, require a mandatory change to the Android application manifest in order to work. It is strictly necessary the right usage of <uses-library> tag, to protect the developed applications against misuse and installation on incompatible devices. In addition the <uses-library> links your application against the Datalogic SDK or possible Datalogic SDK Extension whenever is launched.The inclusion of the following tag (within the <application> element) in all Android applications built with the Datalogic SDK is necessary:
While, in case of use of a further Datalogic SDK Extension, the following change is mandatory (e.g. Selfshopping Extension):
Pay attention while changing the required libraries inside your application's AndroidManifest. If you strictly rely on certain extension, do not forget to emphasize it with android:required tag. Thanks to it, you will protect your application from installation on incompatible devices.