Skip navigation

Zebra wants to anticipate the market needs and respond accordingly to latest technology trends by developing solutions that can support and anticipate customers’ demands. IoT, Artificial Intelligence, Machine learning, Robotics and Data analytics are a few of the most important trends that we will be seeing in the market in the next few years. Many of these technologies want to optimize processes and activities, increasing productivity for end-users and companies.

 

Link-OS is the operating system of the new Zebra printers; this smart OS supports many of these new trends.  The question that arises is how to be more Productive with Link-OS? Let’s try to respond this question with one of the uses cases that explain this new concept.

 

One of the more important variables that you can use to predict trends or to be more productive are the odometers. The odometers help to control the media consumption and print head lifetime.

 

The link-OS printers come with sixteen (16) odometer variables. Let’s review some of them.

“odometer.cut_marker_count” returns the number of cuts incurred.

“odometer.headclean” counts how many inches and centimeters have passed through the Printhead of the printer.

“odometer.headnew” counts how many inches and centimeters have passed since the head was last replaced. 

“odometer.media_marker_count” counts how many labels have passed through the printer by counting the bar sense marks.

“odometer.media_marker_count(1)(2)” are two resettable counters. each one counts how much media has passed through the printer in both inches and centimeters.

“odometer.total_print_length” returns the total length of all media over the life of the printer.

 

You can review the details of the utility of each odometer in the ZPL Programming Guide. The interesting point here is that by using a combination of them, you can define how much media you spend every day/week/month or year.  For example, with the media marker count, you can set up daily counters for media, so you can capture this information on a regular basis, and define some predictable behaviors of the customers. Also, with the odometer.headclean and headnew, you can predict when the printhead needs to be replaced. With the odometers.rfid.void  and rfid.valid, you could define how many tags are being printing correctly, and how many are lost because of a bad calibration or bad quality of the tag. Depending on the numbers obtained, it can tell you when the printer needs a new calibration or when to change the tags.

 

I hope this blog has been useful to define how to work with odometers. It is only an introduction to the topic. You will need to play several times to define the best way to use these variables. Also, you will need to define triggers based on your previous experience of the processes. There is not a precise way to suggest when you need to activate the triggers, but it should give you that tool that maybe you were seeking to predict behaviors of your customers, set up actions, and improve productivity. The odometers can be used with our Cloud Connect Link-OS Technology through web-sockets, so it makes easy IoT implementation.  Feel free to ask questions about this amazing topic, we will be here to try to answer them.

 

We will be reviewing additional use cases to be more productive with Link-OS in our APPFORUM event series. You’re invited to Zebra’s APPFORUM 2017; a forum where tech leaders and developers focused on building and deploying enterprise solutions, build knowledge, exchange ideas and network with peers. Please, join us to our next event at Prague from Jun 14th through Jun 16th followed by Shanghai, China and Asia – Melbourne, Australia. For more info, please, click here.

By the time most developers start working on printing, your app is almost complete or you’re fixing an old app.  You can’t figure out why it takes so much code to print something simple like some text or a table.  You are focused on just getting the code done and working so you can get back to the fun code. 

 

This is where I’m going to say wait!  What about the user experience?  This is where you will probably groan why?  Printers are not really part of the app.  They’re separate devices and you don’t have a choice about how they're designed. 

 

Part of user experience is understanding user interactions.  Your end user is interacting with your app, their mobile device or computer, the OS, the printer, the printout, and probably a few other things like a sidewalk or desk. 

 

Is the printer going to next to the user, or somewhere else?  Do you want them looking at your app, the printer or something else while they work?  What is the expected time it will take for the printer to start printing after the “print” button is hit?  Are multiple users going to be using the same printer, or visa versa? What happens if the printer is off or runs out of paper?  Is the printed image quality as good as you want it to be or does it look faint, small, or squiggly?

 

Some of these questions and the issues associated are why we originally created our Best Practices document.  As a start,  this guide will prompt you to consider how the printer should integrate with your UX.

 

Let me know what you think about UX as it relates to peripherals or if you have more questions to ask as a UX designer.

 

Robin West

Solution Architect

Zebra Technologies

From May 8th through May 12th, our team will be attending APPFORUM AMERICAS 2017 at Planet Hollywood, Las Vegas

There may be a delay in our response. If it's urgent, you can always meet us in Vegas!

 

See you there!

 

Your Zebra Developer Outreach Team

vegas-burj-al-arab.jpg

Many developers may find themselves, or have already found themselves, developing an iOS application connecting to a Zebra MFi product via Bluetooth. Before distributing your MFi app through Apple’s Business-2-Business or standard App Store, you will need to register your app with Zebra as per Apple’s requirements. During this step, Zebra will perform a high-level test of your app to ensure stability, proper printed output, and, if present, appropriate Zebra branding.

 

During the testing process, some of the most common issues that come up occur with the stability of the app. We test for three common error cases as follows:

 

  • The printer disconnected from the app
  • The printer is out of media
  • The printer’s media door is open

 

Out of these error cases, the most common issue we see is that the app will crash in the first case. This is typically due to a lack of exception checking. For example, the app may have been connected to the printer, but what happens if the printer loses battery power while connected?

 

Regularly checking the status of the printer is, in general, a best practice that should be a standard procedure. It’s important to test for these error cases so that users have a more seamless experience. App crashes can be frustrating for users and often lead to unnecessarily requiring the user to input information again if it is not saved prior to the app crashing. To bring a more effective user experience to your app, we recommend implementing error messages for each of the mentioned cases above.

 

Below is a list of properties contained in the PrinterStatus class of the API that is a good reference for implementing proper error checking and error messages:

 

printer_status_properties.png

 

You can find the complete iOS API here:

Link-OS SDK - Zebra Technologies Techdocs

 

Not only will your app appear more complete, but this will also make testing during whitelisting a quicker process in order to get your app distributed in a timely manner.

 

With the AMERICAS APPFORUM fast approaching May 9-11 in Las Vegas, our “Link It Up with Link-OS” session will cover these best practices in more depth with code samples. We’ll also discuss many of the latest Link-OS updates that have materialized over the past year or so. These may be helpful in adding useful features to your printing apps.

It’s been a long journey since Zebra launched ISV PartnerConnect last April, promoting a new integrated program that includes many new benefits for our ISV Partners.

 

The App Locator tool allows Zebra ISV partners to register their applications directly in our new Enterprise Ecosystem for Zebra Apps.  The tool was launched this past November. In this blog, we’ll review how to use the new App Locator tool for validation. The app notifies us when a new ISV partner app has been registered and when it needs to be certificated.

 

Not a registered partner? We want to you to be part of our Zebra PartnerConnect program! The registration is a free fee process and you’ll need only 10 to 15 minutes of your time to complete the registration. All ISVs are welcome to participate.

 

Being part of our Zebra Partner Connect program enhances your possibilities to promote your apps and solutions to customers. You can grow with a closer relationship, and with powerful financial benefits that recognize your valuable collaboration with Zebra. We have developed tools that enhance the visibility of your applications such as App Locator and AppGallery, connecting you with new customers and augmenting marketing efforts.  You’ll have priority access to our team of developers, software architects and ISV technical support for any new software project that you want to integrate and validate with our products.

 

You can review our PartnerConnect program in more detail here, and, if you are interested in registering you can do it here.

 

If you are already one of our ISV partners, you are invited to use App Locator tool to register all your apps. You are also invited to achieve additional milestones with Zebra, such as how to get your app tested and validated, resulting in an increased visibility for your apps and your company.

 

You will need to register your app in App Locator. New changes were integrated into the ISV partner profile account, so you will need to log into your PartnerConnect account.

 

Congratulations!! You have achieved the first milestone with App Locator and have successfully registered your app in our new Enterprise Ecosystem for Zebra Apps.

Fig 1.

 

The second step is to have your app validated by Zebra.

 

During this process, we’ll evaluate your App against Zebra’s best practices, and compatibility with Zebra devices. We’ll provide a simple test template to follow and complete.  We’ll test your App in our Zebra Lab directly or virtually. Once the App passes all tests, you’ll receive a Zebra validation certificate (Fig 1). The final step is to update the App status in our App Locator as the Fig 2 shows, signifying your second milestone achievement.

 

Fig 2.

 

We are excited to share with you these new tools that make easy you interact with us. We want you to increase visibility and enjoy of the benefits by validating your app. Please, follow this link, and complete the Nomination Form request for starting the certification of your app. A Zebra Engineer will contact you and guide you through this process.  The app does not need to be completed to request validation. The Zebra Engineer will work with you directly advising you on a better way of getting your app fully integrated with Zebra products and finally certificated. When you are filling out the form, please, add all Zebra devices you are using with your app; Scanners, Mobile Computers or Printers.

 

Don’t miss the chance to get free visibility on Zebra.com, which attracts more than 20,000 visitors each day. Start tapping the power of the Partner and Application Locator to boost visibility and drive more leads today! To learn more—including how to update your listings—review our Frequently Asked Questions.

 

As ISV partner or non ISV partner, you’re invited to Zebra’s APPFORUM 2017; a forum where tech leaders and developers focused on building and deploying enterprise solutions, build knowledge, exchange ideas and network with peers. We’ll host four events, kicking off with our AMERICAS event at Planet Hollywood in Las Vegas from May 9th through May 11th, 2017., followed by Europe – Prague, Czech Republic, Asia – Shanghai, China, and Asia – Melbourne, Australia.    Registration is now open for the AMERICAS event. For more info, please, click here.

Robin West

Printer Web Page

Posted by Robin West Expert Jan 31, 2017

Hi Everyone,

Have you ever thought about a tool that's been around forever and is super handy, but everyone forgets about it?  Did you know that nearly every printer sold by Zebra for over 10 years has its own webpage?  Just plug the printer into a network and pull up your favorite browser, then type in the printer’s IP address into the navigation bar and the printer will show you its webpage.  There are definitely some hidden secrets to this tool as well.

 

Depending on the release date of the printer it may only show a current configuration at first, others may show a menu of options. Most, if you add “/index.html” after the IP address, will show the full menu.  While you can do most of these things in other ways, the webpage is a nice central place to find a lot of these tools together.  It also makes it easier to centralize and share printers in an office or local network.

 

Configuration (/config.html):

If you select the configuration option, you’ll find helpful debug info about the current state of the printer.  For example, if you are printing a receipt and getting a lot more white space at the end of the receipt than you want, check the label length on this page.  You can also view important information such as firmware version. If you are using a mobile printer, you can also check the battery status by entering JUST the IP address of the printer into your browser without anything after it.

 

Settings (/settings):

This page allows you to access and control many of the printer settings from networking to media calibration all through a simple interface. Be careful of restoring defaults as it will wipe all settings back to factory defaults. This may mean that the printer will no longer be able to connect to your network until set up again via USB or serial.

 

Directory Listing (/dir):

This page, when you first look at it, has a straight forward directory listing, so you can check if your file loaded and verify if it was stored correctly along with how much memory you have left to work with. It has a hidden secret though; if you click on a ZPL label file or create a new one (bottom of the listing), you can actually see the ZPL in the file, modify it, and/or get a preview of the printout.  This preview is very accurate as the printer is fully rendering it as it would for printing.  It only works with ZPL formats, but is super useful if you want to make adjustments without reprinting all the time.

 

Alert Setup (/uns):

Did you know your printer can also alert you when something happens like paper out or overheating? This page is one of the ways you can easily set it up to send you or your customer, an email or alert your app without polling .

 

Printer Controls (/control):

Just want a fast way to pause the printer or cancel a batch of prints?  This page has those simple controls.

 

Some menus are password "protected".  You can change it with the ^KP command.  This password only applies to menu items both on a front panel (industrial printers) and on the web-page.  It does not apply to Wi-Fi or other communications. 

To see some of this, my Dev {Talk} from December shows print preview in action.

 

Robin West

Solution Architect

Robin West

Browser Print Update!

Posted by Robin West Expert Jan 27, 2017

Zebra has again expanded and enhanced our Developer Tools with an enhanced release of our Browser Print Developer Tool.   

 

New features for this release:

  • Now supports MAC OSX!
  • Supports Safari Browser
  • Supports Networked printers
  • Convert images (BMP and JPG) to make them printable
  • We added a few more printers to our tested and compatible list

 

Official Announcement:

Developers can now quickly add USB or Network based printing support to their browser-based apps on Windows 7, Windows 10 and Mac OSX systems, when using Internet Explorer v11, Chrome or Safari. The Source Code and documentation that come with Browser Print make adding print capabilities simple and straightforward. We’ve even gone beyond printing to include features that allow Developers to add Device Management capabilities, such status checking, to their apps.

 

Browser Print supports Windows 7, Windows 10 with Internet Explorer v11 or Chrome v51, as  well as OSX with the Safari browser.

The following printer are supported via USB and Network connections:

 QLn series  ZT200 series  ZD500 series  ZD400 series  LP2824+  GK420  GX420

 

Visit https://www.zebra.com/us/en/products/software/barcode-printers/link-os/browser-print.html  for more details and to access our free Browser Print download.

Continuing the conversation on Link-OS 4.0 updates, let’s review Security, Connectivity, and Flexibility features included with this release, to ensure we provide the best in class experience to our partners and end-users.

 

First up are the security options that were launched with Link 4.0. With the goal to meet privacy best practices, we added a new capability of our Link-OS printers to support SHA2 certificates. SHA1 certificates will be supported until Zebra releases Link-OS 5.0.

 

Within Connectivity several changes and improvements were made to WLAN, Bluetooth, Mirror and ZBI. Under wireless network connectivity, WI-FI roaming and protected management Frames (PMF) were improved to provide a more robust data transmission capability.

 

For Bluetooth connectivity, the printer is capable of avoiding Bluetooth’s interruptions during network reset. In Dual Radio printers, the Bluetooth radio is activated by default or when the WLAN has been turned off.

 

The Mirror system of the Link-OS printers also was updated in this release with new features supporting IIS7 and FileZilla servers. The first capability returns codes 125 and 150, including Time and Date stamping, which is normally required for the mentioned servers.  Also, optimization was completed to thefirmware updating” feature through these servers to avoid conflicts, and to speed up the data transference.

 

Two additional updates were applied and implemented to ZBI and RFID. The former, socket connections, were improved to avoid endless connection when running ZBI programs. The latter, RFID printers, now, support Monza 6 tags. Also, "RFID avoid" was removed to be used again during lower-than-configured darkness set up.

 

For flexibility, Zebra is trying to build the Link-OS printers more friendly, useful and accessible to end-users.  Zebra engineers looked for ways to provide a better UX experience. A Front-Panel Counter will display the number of labels printed. This new feature can be enabled through of one of the new SGD commands.

 

! U1 setvar "display.batch_counter" "enabled"

To respond and meet partner and customer requirements, Zebra Included 20 new SGD commands in the new firmware. The most important commands included are:  retrieve print head dpi, keeping the Clock and certificates aligned, Data capture and visibility agent control.  For the full list of commands and implementation, please refer to release notes of the firmware on each Web-Link-OS printer-page.

 

In future blogs, we’ll review all these new features in detail to share the best practices during implementation. Feel free to contact us for more information.

Zebra has worked diligently over the past few years to produce and offer smart printers, combining the best quality, features, and prices.

 

Link-OS 4.0 is one of the most important milestones achieved by Zebra, meeting customer expectations and the requirements of an interconnected and demanding world. With the new Enterprise Asset Intelligence category in place, and a Big Data analysis perspective, Zebra has developed a new tool to help companies make smarter decisions.

 

Let’s look at the most important new features that Link-OS 4.0 has brought to the table. All changes and new features fall into four main categories; Visibility, Security, Flexibility and Connectivity.  Let’s talk about Visibility first.  

 

analy type.jpg

Zebra completed an important update: The “Visibility Agent.”  This refers to the capability of the new Link-OS printer to gather and transmit printer data via the Zebra controlled Cloud Server. Printer device usage and status information is shared and it does not send personal, barcode or text field data.

 

Our Zebra engineers met this milestone by developing several pieces of new technology, including the “Zebra Printer Connector” or (ZPC) App. The ZPC APP easily integrates with our Enterprise Asset Intelligence Platform. It transforms all big data received from Link-OS printers into intelligent information, easily consumed and analyzed by company decision makers. It utilizes the new Zebra Asset Visibility Services (AVS), translating into more cost effective, optimized processes.

 

By default, Visibility Agent is active. You are able to turn this new feature off through the front panel or directly through Zebra Setup utilities by sending the new SGD command:

! U1 setvar "weblink.zebra_connector.enable" "off"

 

linkos blog image.png

For more detailed information about AVS, please visit the following link.
https://www.zebra.com/us/en/services/run/visibility-services.html

 

For more detailed information about Visibility Agent and “Zebra Printer Connector,” please, read the new release notes that are posted next to the latest firmware download link of each Link-OS Zebra printer.  You can easily find this new release document by the number 20 firmware release identifier (ex. V74.20.01Z).

 

Zebra is excited to share with these new differentiated features on Link-OS 4.0. The upcoming Multiplatform Link-OS SDK will reflect some new, exciting features as well. However, you can engage with them now, since most can be activated and managed through SGD commands.

 

If you need assistance or support with some of them, please, do not hesitate to ask for more information. For more information on changes made in security, flexibility and connectivity go here.

As the holiday season approaches, we anticipate Apple to shutdown iTunes Connect next month, and during this time new apps and app updates will not be processed. Last year, this took place December 22nd through the 29th.

 

If you plan to schedule app releases or other app changes that require your app to undergo Zebra’s whitelisting process, please plan accordingly as we’ve previously received many requests around this time. If you are unsure whether or not you must register your app with Zebra, please refer to the following iOS App White Listing FAQ page:

https://www.zebra.com/content/dam/zebra/product-information/en-us/brochures-datasheets/software/ios-app-whitelisting-faq-en.pdf

 

Watch for the 2016 Apple shutdown dates soon!

Hello Programmers!  I’m back again with my series on printing from within websites.  This time I’m going to talk about using a client program to print. 

 

The downside is that, until recently, you had to write a client program for every OS you wanted to support with your website.  There is still the possibility that you may want to do that, but there are now several options to serve this need.

 

The benefits of using a client program are that most support multiple connectivity types like USB, Network, and Bluetooth.  They also are now supporting multiple OS's.  Some of these programs are self-contained and handle many aspects of printing including status checking and formatting.  Other programs provide a large amount of control to you as the web developer to handle the entire user experience.  Regardless of which you choose, your website coding to work with these apps is minimal.

 

Zebra has our own app to enable web-based printing called Browser Print.  This first release is for PC and USB connections, but stay tuned as we look into other operating systems, browsers, and connectivity types.  We are providing a JavaScript library and simple sample code to help enable your web apps.  It gives you full bi-directional control of the printer to get status and settings as well as print.

 

If your web app is primarily targeted towards mobile devices, Zebra has several partners with excellent apps that work with your webpages to allow your customers to print.  Sample code is easy to integrate. These apps are designed to take the heavy lifting of handeling the printer off your hands.

MobiPrint by Arrowhead

Centvia by Centrategy

 

 

Earlier Articles on this topic:

Printing from Websites part 1

Printing from Websites part 2

Zebra Web Printing Solutions

 

Robin West

Solution Architect

Zebra Technologies ISV

Connecting to and receiving data from a printer through Web apps has been a very complicated process for developers. Zebra Browser Print makes adding print capabilities to Web-based apps simple and straightforward. Browser Print even enables bi-directional communication between a Web app and printers connected to a PC via local ports, such as USB. This, along with clear documentation and sample code, gives the ability to implement best practices by checking printer status, and making real-time decisions based on the information, conveying that information via the UI.

 

Zebra’s Browser Print allows webpages to communicate with Zebra peripherals connected to a given computer. This allows cloud-based applications to print to virtually any user’s printer. Currently, Browser Print supports the Windows 7 and 10 operating systems, Google Chrome and Internet Explorer browsers, and Zebra printers connected via USB.

 

Learn more and get access to the free Browser Print download.

 

Key Facts

Browser Print:

  • Supports major PC operating systems so your website is more portable.
  • Includes a client app and a JavaScript library to make it easy to integrate into websites.
  • Is bi-directional to allow for status checking and printer setup as well as printing.
  • Is compatible with many Link-OS and ZebraLink printers, including the ZT200 Series, ZD500 Series, ZD400 Series, and the LP2824+ printers.

 

Supporting Quotes

Andrea Betancourt, Development Manager, Servibarras

“The Browser Print driver speeds up the development process because the driver allows you to control the status of the printer without the need to develop complex code. In addition, the driver is able to detect all types of Zebra printers installed on a PC or internal network. This driver makes it easier to configure printers, and at the same time, simplifies software development.”

 

Marcelo Neves, Lead Developer, Nubo Solutions

"Zebra Browser Print helped us to improve our product by allowing it to automatically discover local printers as well as detect and properly handle errors that may occur during the printing process."

 

DEV { TALK } – September 7 - Interested in Connecting a Printer to a Web App?

 

Join our ISV Program to get early access to dev tools and validate your solutions with us like Servibarras ans Nubo Solutions did!

 

Not sure if Browser Print will meet your needs?  Tell us what will!

 

About Servibarras

A Colombian company with 20 years of experience in the graphic arts industry.  Servibarras is committed to offering its customers more value than any other ally, through differentiation by portfolio, quality and service, within a framework of continuous improvement, growth and stable partners and employees, as well as growing relationships with its suppliers. For more information, visit http://www.servibarras.com/.

 

About Nubo Solutions

A Brazilian software company for business automation, which develops and provides flexible products for the most varied vertical retail businesses. An intelligent platform in the cloud, which enables the construction of solutions tailored to your business, whether micro, small or large. The solutions meet special Brazil’s regulations in its different implementations - Fiscal Electronics Consumer Note (NFC-e), SAT Tax and Fiscal Shielded Module (MFB / Convention 09). For more information, visit http://nubo.solutions/.

 

UPDATE: New features have been added recently! Browser Print Update!

Hi Everyone,

We've gotten several requests for some basic sample code for the Link-OS Multiplatform SDK showing it's use with Xamarin.

First, you need to install the SDK, either by downloading it from Zebra.com and following the install instructions, or getting it directly from Nuget. Full API documentation is on Link-OS SDK - Zebra Technologies Techdocs .

 

The sample code creates an app with a text box for entering a printer address and a print button.  When you press the print button, the words "Hello World" print on your Zebra Printer. The address can be an IP address or a Bluetooth MAC address for your printer. 

 

This sample code is for Android, but you can copy the printing portions into an iOS or Forms app without changes.  I gave permissions for BLUETOOTH and BLUETOOTH_ADMIN in the manifest.  As a note, this code will set your printer to ZPL mode, so if you want to your app to print in line mode, you will need to change it back or modify the code.   If you just want to test this code over Bluetooth, you can speed up time to print by changing the connection builder string to connection = ConnectionBuilder.Current.Build("BT:" + address);

 

Happy Coding!

 

MainActivity.cs

/***********************************************

CONFIDENTIAL AND PROPRIETARY

The source code and other information contained herein is the confidential and the exclusive property of

ZIH Corp. and is subject to the terms and conditions in your end user license agreement.

Copyright ZIH Corp. 2016

ALL RIGHTS RESERVED

***********************************************/

using System;

using Android.App;

using Android.Widget;

using Android.OS;

using System.Threading.Tasks;

using LinkOS.Plugin.Abstractions;

using LinkOS.Plugin;

using Android.Util;

using System.Text;

 

namespace BasicPrint

{

    [Activity(Label = "BasicPrint", MainLauncher = true, Icon = "@drawable/icon")]

    public class MainActivity : Activity

    {

        Button button;

        EditText addressTxt;

        const string tag = "BasicPrintApp";

        IConnection connection;

 

        protected override void OnCreate(Bundle bundle)

        {

            base.OnCreate(bundle);

 

            // Set our view from the "main" layout resource

            SetContentView(Resource.Layout.Main);

 

            // Get our button from the layout resource,

            // and attach an event to it

            button = FindViewById<Button>(Resource.Id.MyButton);

            addressTxt = FindViewById<EditText>(Resource.Id.address);

 

            connection = null;

 

            button.Click += delegate {

                Start_Print();

            };

        }

 

        private void Start_Print()

        {

            button.Enabled = false;

            string address = addressTxt.Text;

 

            // Bluetooth communications must be handled on a separate thread and it's

            //    best practice to handle network coms on it as well

            new Task(() =>

            {

                Print(address);

            }).Start();

        }

 

        private void Print(string address)

        {

            string zpl = "^XA^LL200^FO30,20^A0N,30,30^FDHello World^FS^XZ";

 

            try

            {

                if ((connection == null) || (!connection.IsConnected))

                {

                    connection = ConnectionBuilder.Current.Build(address);

                    connection.Open();

                }

                if ((SetPrintLanguage(connection)) && (CheckPrinterStatus(connection)))

                {

                    connection.Write(Encoding.ASCII.GetBytes(zpl));

                }

            }

            catch (Exception e)

            {

                //if the device is unable to connect, an exception is thrown

                Log.Debug(tag, e.ToString());

            }

            finally

            {

                this.RunOnUiThread(() =>

                {

                    button.Enabled = true;

                });

            }

        }

 

        private bool SetPrintLanguage(IConnection connection)

        {

            string setLanguage = "! U1 setvar \"device.languages\" \"zpl\"\r\n\r\n! U1 getvar \"device.languages\"\r\n\r\n";

            byte[] response = connection.SendAndWaitForResponse(Encoding.ASCII.GetBytes(setLanguage), 500, 500);

            string s = Encoding.ASCII.GetString(response);

            if (!s.Contains("zpl"))

            {

                Log.Debug(tag, "Not a ZPL printer.");

                return false;

            }

            return true;

        }

 

        private bool CheckPrinterStatus(IConnection connection)

        {

            IZebraPrinter printer = ZebraPrinterFactory.Current.GetInstance(PrinterLanguage.ZPL, connection);

            IPrinterStatus status = printer.CurrentStatus;

            if (! status.IsReadyToPrint)

            {

                Log.Debug(tag, "Printer in Error: " + status.ToString());

            }

            return true;

        }

 

        protected override void OnPause()

        {

            base.OnPause();

 

            Log.Debug(tag, "Closing connection on inactive app");

            if ((connection != null) && (connection.IsConnected))

            {

                connection.Close();

            }

        }

    }

}

Main.axml

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    android:orientation="vertical"

    android:layout_width="match_parent"

    android:layout_height="match_parent">

    <EditText

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:id="@+id/address"

        android:hint="@string/Address" />

    <Button

        android:id="@+id/MyButton"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:text="@string/Hello" />

</LinearLayout>

 

Robin West

Solution Architect

Zebra Technologies

The newly released v2.11 SDK includes support for Bluetooth Low Energy (BTLE) in the Java-based Android and PC toolkits. You can now quickly add BTLE support to Java-based apps for use on Android and PC devices. This SDK lets you save considerable time as you develop your own solutions.

 

New Source Code, new Developer Demos and documentation in the Zebra SDK make adding BTLE simple and straightforward. We’ve also expanded the use of our very fast “large file transfer” MultiPartForm technology to support additional use cases, such as creating printer profiles and sending fonts or graphics to printers. The new SDK also offers additional graphic conversion methods as well as a new “file freshness” feature that can help you detect if the contents of a file on the printer are changing.

 

This new SDK supports all of the Mobile, Industrial or Desktop printers in the Link-OS family, including the iMZ, QLn, ZQ500, ZT200, ZT400, ZD500 or ZD400 series.

 

To download the SDK, go to our LINK-OS MULTIPLATFORM SDK page.

 

For more information, go to Zebra’s Application Note Link-OS® Environment Bluetooth® Low Energy.

We’ve all been there. You start your day with a nice cup of coffee and start clicking through the emails. Suddenly your boss shows up and says “Our biggest customer asked for feature X. Make it happen.”  Normally a quick Google search will get you started, but this time he also drops a stumper on you.He puts a box on your desk. Maybe it’s old looking or just newly shipped. You tentatively peek inside to see a strange device. He tells you it’s a printer.  It doesn’t look like any printer you’ve seen. You’ve been told you need to make your app print an inventory label or a receipt with it. Now what? Where do you even start?

 

Zebra has just published a new guide just for those of you who have never worked with a Zebra printer before. It guides you through step by step initial set up of your printer and making sure it can communicate the way you want it, through creating your first printing app. We hope you find it useful.

 

P.S. The first step is not- plug the printer into the computer.

 

Robin West

Solution Architect

Zebra Technologies ISV

Developer.zebra.com

Filter Blog

By date:
By tag: