How It Works

The HP JetAdvantage Link Platform

The HP JetAdvantage Link Platform lets you install your app on an HP printer, where users will launch and use your app right from the device's control panel. Your app will use the Link library to utilize the scanning and printing functions of the device.

You will develop your app using many of the same tools and technologies you already use to develop Android mobile apps. The device even supports remote debugging using the Link Debug Bridge (a version of ADB).

Enabling the Link Debug Bridge (LDB)

The Link Debug Bridge (LDB) is a version of ADB. It allows you to install and debug your unsigned app on a device over the network from within Android Studio:

adb connect <device_ip_address>

Warning: As a security measure, when enabling/disabling LDB, any currently installed apps will be automatically removed.

Note: As a security measure, the App Gallery will be disabled while LDB is enabled.

To Enable LDB, follow these steps:

A. Create a personal LDB Service Key on the LDB Service Key page
B. Connect your device to a network with internet access
C. If required by your networking environment, use the EWS to configure the device to use your web proxy (See instructions here)
D. LDB can only be enabled from the device's control panel. Enable LDB as follows:

Installing and Debugging Your App

There are two ways to install your unsigned app on a device:

Using the HPK tool

Using LDB and Enhanced Debug Experience (EDX) Mode

Using the HPKTool

Any app intended for use on any HP device must be specially packaged (HPK file), submitted to HP for verification and validation (VAV), and finally signed by HP before it can be installed on a device (without LDB enabled). The SDK contains an HPKTool to make it easy to package your app in an HPK. A HPK file includes your signed APK and provides app-related information not present in a standard APK file. A HPK file intended for VAV and publishing must include the signed/release version of your APK. (Note: The APK must be signed using V1 JAR Signature.)

When used with a device where LDB is enabled, the HPK tool will allow you to install your unsigned HPK so you can test out the process before submitting your HPK to HP for VAV. Once installed, a button will be created on the device's control panel. (Note: You may need to press reset on the control panel before the button will appear.)

Once installed, you can launch your app from the front panel or from the adb console.

Using LDB and Enhanced Debug Experience (EDX) Mode

You can install your APK using LDB:

adb connect <device_ip_address>:5555

adb install <path_to_apk>

Note: Due to optimizations made by Android Studio for Instant Run, you cannot simply copy a debug APK out of Android Studio and install it. You must use either an APK generated from the command line or one specifically built using the “Build APK(s)” command from Android Studio’s “Build” menu. Release APKs will always work.

In normal mode, the Link Platform does not expose its own launcher. Instead, HP devices switch to the Link Platform when an app is launched and switch back when the app is closed. So when installing over LDB, you will not be able to launch your app directly from the HP home screen.

For your convenience, we have provided an Enhanced Debug Experience (EDX) mode that enables you to access the Link Platform's launcher just for app development. To turn on EDX mode, run the following command:

adb shell /system/bin/set_edx -v true

When EDX mode is enabled, a new "Launch Link Home" button will appear on the control panel to allow you to access the Link Platform launcher and from there launch your app:

You will also be able to load and debug your app using Android Studio's Instant Run functionality.

If you are debugging/testing with long breaks and need to disable the automatic UI timeout, you can establish a wake lock by running the following command:

adb shell /system/bin/set_edx -awake true

To disable EDX mode, run the following command:

adb shell /system/bin/set_edx -v false

Note: Disabling EDX mode will automatically release the wake lock.

To see all available options, run:

adb shell /system/bin/set_edx -help

UI Switching

A Link app is represented as a button on the built-in (native) home screen. When that button is pressed, the device switches to the Link platform and launches the app. At this point, the app has the same UI abilities as android apps running on other platforms.

When the app is closed (by navigating back or by pressing home button), the device switches back to its native home screen. By design, apps are not expected to clear user session data on these transitions. This allows users to exit and reenter the app without losing their place.

The app can also be automatically closed by a reset condition (UI timeout, forced user sign-out, etc.) all of which also end the current user session. By design, apps are expected to clear user session data on these transitions.

It is important for you to understand these transitions, so you can implement your app appropriately. Please refer to the following diagram:

UI Style Guide: Tailoring Your App for HP Devices

HP device control panel sizes differ from panel sizes commonly found on mobile devices, so you may need to adjust your screen layouts to look their best on these panel sizes.

For example, there is a specific recommended HP home screen icon size for each control panel size. The following table lists the HP device control panel sizes and their respective recommended HP home screen icon sizes: