Getting Started with Android Development Zebra Android Link-OS SDK Android Studio

Similar documents
Getting Started with Windows Mobile Development Windows Mobile SDK C#

Getting Started with Apple ios Development Link-OS SDK Objective-C

How to Set up Eclipse and Android SDK Manager Environment You need to download the following

Building MyFirstApp Android Application Step by Step. Sang Shin Learn with Passion!

XML Tutorial. NOTE: This course is for basic concepts of XML in line with our existing Android Studio project.

Introduction To Android

ECOM 5341 Mobile Computing(Android) Eng.Ruba A. Salamah

ANDROID APPS (NOW WITH JELLY BEANS!) Jordan Jozwiak November 11, 2012

Choose OS and click on it

Application Development Setup Guide

Link-OS SDK for Xamarin README

EUSurvey OSS Installation Guide

DO NOT POWER ON THE ZEBRA PRINTER OR CONNECT THE USB CABLE UNTIL INSTRUCTED TO DO SO!

Android Development Tools = Eclipse + ADT + SDK

Programming Mobile Applications with Android Lab1

CS 403X Mobile and Ubiquitous Computing Lecture 3: Introduction to Android Programming Emmanuel Agu

CS 4518 Mobile and Ubiquitous Computing Lecture 2: Introduction to Android. Emmanuel Agu

IT-G400 Series. Android 6.0 Quick Start Guide. This document is a Development Guide Book for IT-G400 application developers. Ver 1.

Installation Guide - Mac

Lab 3: Using Worklight Server and Environment Optimization Lab Exercise

Installation Guide Worksoft Certify

Installing and Using PrintConnect

CS 528 Mobile and Ubiquitous Computing Lecture 1b: Introduction to Android. Emmanuel Agu

Android Studio is google's official IDE(Integrated Development Environment) for Android Developers.

Signing For Development/Debug

FX SERIES. Programmer s Guide. Embedded SDK. MN000540A01 Rev. A

Developing Android applications in Windows

Android. Lesson 1. Introduction. Android Developer Fundamentals. Android Developer Fundamentals. to Android 1

Mobile OS. Symbian. BlackBerry. ios. Window mobile. Android

With Jem Matcher working on PC, we can finally set up

Installation Guide - Windows

Tutorial on Basic Android Setup

Programming Concepts and Skills. Creating an Android Project

Platform SDK Deployment Guide. Platform SDK 8.1.2

Setting Up Resources in VMware Identity Manager (On Premises) Modified on 30 AUG 2017 VMware AirWatch 9.1.1

Introduction to application management

Installation Instructions

Android Application Development. By : Shibaji Debnath

Setting Up A New Zebra ZQ510 Mobile Printer For Use With the Church Community Builder Check-in App. Part 1: Install the Zebra Setup Utility

Tutorial: Android Object API Application Development. Sybase Unwired Platform 2.2 SP03

BEAWebLogic. Portal. Tutorials Getting Started with WebLogic Portal

JD Edwards EnterpriseOne 8.12 (Tools Release 8.96) Standalone Version

i2b2 Workbench Developer s Guide: Eclipse Neon & i2b2 Source Code

VMware Horizon FLEX Client User Guide

Virtual Workplace Personal Device Client Installation Instructions

Oracle Database Express Edition

VMware Horizon FLEX Client User Guide. 26 SEP 2017 Horizon FLEX 1.12

Setting Up Resources in VMware Identity Manager. VMware Identity Manager 2.8

This document providesanoverview ofthestepsrequired to implement an android app which will call the ACH android SDK.

ScanKey. User s Manual Version: Page 1 of 19

IBM BlueMix Workshop. Lab D Build Android Application using Mobile Cloud Boiler Plate

Lab Android Development Environment

Autodesk DirectConnect 2010

EMC Documentum Composer

Sample Spark Web-App. Overview. Prerequisites

Cisco CVP VoiceXML 3.1. Installation Guide

Installation Instructions

Modeling Network Integrity Release 7.3.1

Installation Guide - Mac

WAVELINK AVALANCHE REMOTE CONTROL 3.0 QUICK START GUIDE

Installing and configuring an Android device emulator. EntwicklerCamp 2012

EMC Documentum Composer

Step 1 Turn on the device and log in with the password, PIN, or other passcode, if necessary.

Zebra Link-OS Environment Version 2.0

New World ERP-eSuite

Homework 9: Stock Search Android App with Facebook Post A Mobile Phone Exercise

Installation Guide. . All right reserved. For more information about Specops Deploy and other Specops products, visit

IBM Maximo Anywhere Version 7 Release 6. Planning, installation, and deployment IBM

MageNative Apps User Guide Series

Android App Development

SD Module-1 Android Dvelopment

LiveNX Upgrade Guide from v5.1.2 to v Windows

Contents Overview... 5 Upgrading Primavera Gateway... 7 Using Gateway Configuration Utilities... 9

EUSurvey Installation Guide

Installation Guide. . All right reserved. For more information about Specops Deploy and other Specops products, visit

If you don t have the JDK, you will need to install it. 1. Go to

Web-enable a 5250 application with the IBM WebFacing Tool

Android Sdk Setup For Windows 7 32 Bit Full Version

Create new Android project in Android Studio Add Button and TextView to layout Learn how to use buttons to call methods. Modify strings.

A quick guide to installing the SpesCoin Wallet for Windows and MacOS users SPESCOIN WALLET. Installation Guide

Raptor University. Installing Raptor v Instructor: RAPTOR TECHNOLOGIES, LLC

Contents Overview... 5 Downloading Primavera Gateway... 5 Primavera Gateway On-Premises Installation Prerequisites... 6

Table of Contents. Installation Preface... 1 Prerequisites... 1 Installation Procedure... 1

Installation Guide OriginPro (Home-Use and Network-License)

WFCE - Build and deployment. WFCE - Deployment to Installed Polarion. WFCE - Execution from Workspace. WFCE - Configuration.

IBM Maximo Anywhere Version 7 Release 6. Planning, installation, and deployment IBM

Version 6.3 Upgrade Guide

Raptor University. Installing Raptor v Instructor: RAPTOR TECHNOLOGIES, LLC

Installing and Running the Google App Engine On a Macintosh System

Sync User Guide. Powered by Axient Anchor

DH100 Mobile Apps. Right For Business DH100 SERIES. USER GUIDE English Version Copyright 2012 Digimerge Technology Inc.

Android Studio Setup Procedure

User documentation. BEEM v1.0 January 2010

Installing and Building Apps on a Mac

McMaster Service-Based ehealth Integration Environment (MACSeie) Installation Guide July 24, 2009

Using the JSON Iterator

BEAWebLogic. Portal. MobileAware Interaction Server Installation Guide

Participant Handbook

GRS Enterprise Synchronization Tool

12 Publishing Android Applications

Transcription:

Getting Started with Android Development Zebra Android Link-OS SDK Android Studio

Overview This Application Note describes the end-to-end process of designing, packaging, deploying and running an Android application using the Zebra Link-OS Multiplatform SDK and Smartphone Utility. The sample code used in this Application Note is from the sample code article Connectivity Demo. Target Audience The information in this document assumes that you have technical competence with Microsoft Windows, Java development with the Android Studio Integrated Development Environment (IDE), and core programming concepts and rationales. For information on joining the ISV Program, contact a Program Manager in your area. System Prerequisites This Android SDK requires the following system prerequisites. Java Development Kit (JDK) To develop Android applications, you must install the latest version of the JDK. Download the JDK. Android Studio V1.2.1.1 This guide uses the Android Studio IDE which comes with the Android SDK. The Android SDK is distributed free of charge by Google. It contains sample code, libraries, emulators and tools to help you build applications for the Android platform. Download the IDE. Android Mobile Device While the Android Emulator included in the Android SDK satisfies most of the anticipated requirements for developing Android applications, we recommended that you test all development with a physical device. Note: The Zebra Link-OS Multiplatform SDK supports various printers and mobile devices. Zebra Link-OS Multiplatform SDK The Zebra Link-OS Multiplatform SDK contains all the required components to develop applications for Zebra label printers. The SDK includes a Java library (.jar), which provides the means to scan for, connect to, and print on Zebra label printers. Download the Zebra Link-OS Multiplatform SDK, find system prerequisites, and learn more here. In order to fully test the application you create, you must have a network-enabled Zebra printer capable of understanding ZPL or CPCL. 2

Bluetooth connectivity is available through the Zebra Link-OS Multiplatform SDK and covered in other available tutorials. Check out all of the Zebra label printers. Zebra Network-Enabled Label Printer In order to fully test the application created during the course of this tutorial, you must have a network-enabled Zebra printer capable of understanding ZPL or CPCL. Bluetooth connectivity is available through the Zebra Link-OS Multiplatform SDK and covered in other available tutorials. Zebra Link-OS Multiplatform SDK supports various printers and mobile devices. Installations You must install all of the items listed in the System Prerequisites section. Note: The default installation options for all these prerequisites are satisfactory. 3

Creating Your Zebra Android Connect and Print Application Project You will be guided on how to create a mobile application that allows a handheld device to establish a Bluetooth or TCP/IP connection with a Zebra mobile printer. To begin, launch Android Studio and locate your desired workspace path. This section includes instructions on how to: Create an Android Project Design Your Zebra Android Connect and Print Application Create Java Helper Classes Update ConnectivityDemo.java and Include the Zebra Multiplatform SDK Library for Android Run Your Zebra Android Connect and Print Application Deploy Your Mobile Application Create an Android Project 1. Go to File -> New -> Android Application Project. 2. Type isv.zebra.com for the Company Domain. 3. Verify that the Package name is "com.zebra.isv.connectandprint". 4. Choose the Project location. Note: For the purpose of this application note, we use C:\MyFirstZebraAndroidApp\ConnectAndPrint. 4

5. Click Next, leaving the next windows at default, until the Blank Activity window appears. 6. In the Customize the Activity window, change the activity name to ConnectivityDemo and click Finish to exit the window. Design Your Zebra Android Connect and Print Application 1. Define the variables and values to use in the layout (xml) files later. In the Package Explorer, open strings.xml in the res/values folder. Replace the contents of the String.xml file from the Strings.xml file from the sample article Connectivity Demo. For information on joining the ISV Program, contact a Program Manager in your area. This source code defines the Application Name that appears on the GUI, as well as the color Red for the status bar background when no printer is connected. For more information, go to String Resources. Save and close the file. 2. Define the layout. In the Package Explorer, expand the res/layout folder. Delete activity_connectivity_demo.xml. In the same folder, create 2 files, connection_screen_with_status.xml and connection_screen.xml. Replace the contents of the two files with the contents of the connection_screen_with_status.xml and connection_screen.xml files from the sample article Connectivity Demo. connection_screen.xml defines a layout with elements for Bluetooth and TCP/IP 5

input. connection_screen_with_status.xml is similar to the above, with the exception of an additional connection status bar at the top. Note: For more information, click Layout Resource. Save and close the files. 3. Update the AndroidManifest.xml. Replace the contents of the AndroidManifest.xml file with the contents of the AndroidManifest.xml file from the sample article Connectivity Demo. Note: The AndroidManifest.xml contains critical information to build the project correctly, 4. Go to res/menu folder to delete the connectivity_demo.xml file settings menu. Create Java Helper Classes 1. Right click on src, hover over new and click Package to create a new Java Package. 2. Choose...\app\src\main\java as the destination directory and name the package com.zebra.isv.util. 3. Create a file DemoSleeper.java in the com.zebra.isv.util package and replace its contents from the DemoSleeper.java file from the sample article Connectivity Demo. This file contains a static sleep method that ConnectivityDemo.java uses. 4. Create a file SettingsHelper.java in the com.zebra.isv.util package and replace its contents from the SettingsHelper.java file from the sample article Connectivity Demo. This file contains methods used in ConnectivityDemo.java to persist Bluetooth and TCP/IP settings for subsequent recall. Update ConnectivityDemo.java and Include the Zebra Multiplatform SDK Library for Android 1. Replace the source code in ConnectivityDemo.java with the contents of the ConnectivityDemo.java file from the sample article Connectivity Demo This class is the starting point of the Android application. 2. Browse to the location of the ZSDK_ANDROID_API.jar file and copy it to the 'app folder'. Note: The default installation path of this file should be C:\Program Files\Zebra Technologies\link_os_sdk\android\v2.8.2148\lib\ZSDK_ANDROID_API.jar. 6

3. At this point, you should see many errors. To resolve the dependencies, go to File -> Project Structure -> app(under Modules) -> Dependencies. 4. Click on the '+' symbol -> File Dependency and choose the ZSDK_ANDROID_API.jar. Run Your Zebra Android Connect and Print Application 1. Build and run the application. Click the green play button at the top, or alternatively, Run -> Run app. and click OK to launch from emulator. To run the application, unlock the screen on the emulator. To do this, drag the green lock icon to the right of the screen. 7

This runs the application in an Android emulator. The emulator might take a while to start up, depending on the available computer resources and hardware. Congratulations! You now have your first Zebra mobile application running on an emulator! 2. To exit the application, click Back on the emulator. To continue development, leave the emulator running as it takes considerable amount of time to start up. Note: The Bluetooth and TCP/IP connectivity may not be correctly emulated. Test the application on a physical device, which will be covered in the next section. 8

Deploying Your Mobile Application After your project is complete, you can export it into an Android Application Package (.APK) file for deployment on an Android Device. 1. Go to Build -> Generate Signed APK. A dialog appears asking you to enter keystore information. 2. Type the keystore information. If you do not have this information, type C:\AndroidKeyStore (or any other desired folder) as Location, and then type your desired password. 3. Fill up the Key Creation form and click Next. Note: You must enter at least the Alias, Password, Confirm, Validity and First and Last Name fields. If you do not, you are not allowed to proceed. The.APK file should be in your C:MyFirstZebraAndroidApp\ConnectAndPrint\app folder. Copy the.apk file to your device and install your application. See Also For any further information, sample code and solutions or to request further content, visit the Zebra Developer Portal. 9

Document Control Version Date Description 1.0 July 2015 Initial Release 2.0 2nd October 2017 Updated URLs Disclaimer All links and information provided within this document are correct at time of writing Created for Zebra Global ISV Program by Zebra Development Services. 10