Some features might require a newer version of the Staging app. We suggest that you always make sure to run the latest app either through the “self-update” command or by installing the latets version from here.

Project

A project contains one or more commands as well as some settings. You can work on multiple projects at any time. Use the tabs at the top to switch between projects.

 

All projects will only be stored locally in your browser! If you uninstall your browser or clear the browser data, you might lose your projects.
Make sure to download your project files before switching your browser or PC!

Create new project

Use the button on the far right of the tab bar to create a new project.

Here you can enter a name for your project. You can also open an existing project.
If you open a project file, the name will be read from the file and set automatically. You can also change the name.

Working with a project

On the top of each project, you have the main options. The first option opens the command picker where you can choose a new command to add to the project.
The middle option action allows you to export the project in different formats. See below for more details on the export options.
The last option lets you rename, clone or delete the project as well as open the project settings.

Project settings

This panel provides access to the project and barcode settings.

The first section lets you define device requirements for this project. If one of the requirements is not met, the staging will stop with an error message.

  • “Require Internet connection” checks for an internet connection of any kind
  • “Require WiFi connection” will check if the device is connected to a Wi-Fi network. This will not check for an internet connection on its own
  • “Check for updates” will run an update check before executing the first command. This will require a working internet connection. If you want to run this manually you can use the self-update command.
  • “Require charging” will check if the device is currently connected to any kind of power source

If you are setting up your Wi-Fi or Internet connection with one of the commands, make sure to not choose any of these requirements because those are tested before the first command is executed.

The second part allows you to change the output of the barcode export. The default settings should work fine for more cases but you can change the bytes per block and scale if you have issues scanning the codes.

Commands

Adding a new command

To add a new command, press the green “Add command” button at the top of your project. This will open a window listing all available command types.
Use the search bar at the top to find the command you want to add.

 

Select any command by pressing the “Add […] command” button.

Editing a command

On the left half of the main panel, you see a list of all your current commands.

The first column shows the position in the list, the 2nd column shows the name of the command with the command type after that.

At the end of the row, you’ll find several actions:

  • opens the command in edit mode. Your changes will not be saved until you hit SAVE at the bottom of the command editor
  • creates a copy of the command, including all the settings, below the current command
  • removes the command
  • moves the command up by one
  • moves the command down by one

The actual editor panel depends on the command type. You can read more about the various command types below.

Command types

Below you’ll find a list of all command types with some description and examples. Some commands are more complex than others so make sure to read the description carefully and feel free to contact support if anything is unclear.

Run remote script

This allows you to run any set of commands from a server. Export a project as a “remote script” and point the command to that file. Currently, only http/https links are supported.
You can also use placeholders to provide more details about the device in the request. This can be used to provide slightly different commands to different products or single devices.

For a list of all supported URL schemes, see here.

Example: Read and execute commands in a script from a server. The device serial number is used as the file name to provide a different configuration for each unit.

 

Settings

With this, you can change any setting in Android within the Global, System or Secure namespace.
There is a list of common settings to choose from but you can enter key by choosing the “other setting” option.
For most of the predefined settings, you can only choose ON or OFF but some have a text input. Please make sure to use a possible value in those cases.

For a manual key, you can find a list of possible keys for each namespace here.
You can also get the current values from a device using USB-Debugging and the command “adb shell settings list global|system|secure“.

Please note that some values might affect the system immediately while others will require a system reboot.

Example #1: Disable the screen rotation using a preset

Example #2: Disable the notification that an open Wi-Fi network is nearby

 

WLAN

Use this to connect to any Wi-Fi network. You can either just set up the network or immediately connect to it. For the latter case, the staging process will hold until a connection is established.

Example: Connect to a WPA2 secured network

 

Download

With this command, you can download any file to the device. Make sure to provide a valid local path that you can write to. To ensure this, you should use the %sdcard% or the %temp% placeholder (e.g. “%sdcard%/your-filename.xml).
Please note that other apps might able to access the file at %sdcard% but no other app can access files at %temp%. File in %temp% will be available for the whole time while your commands are executed but might be removed automatically after your project is completed.

For a list of all supported URL schemes, see here.

Since v1.5.0 you can also omit the filename for the destination and only provide a folder. In this case, the destination must end with slash!
E.g.: URL=”https://example.com/folder/file.jpg” and Destination “%sdcard%/myfiles/” will download the file to “%sdcard%/myfiles/file.jpg”.

Example: Download an image to the internal storage with the name “wallpaper.jpg”. If the file exists, it will be overwritten by the new download (we’ll set this file as the device wallpaper later)

 

Copy file

Use this to copy a local file from one path to another. Make sure that both the source and destination are valid paths and that the source does exist.

Example: We copy the file from the previous step to a new location. If the target file already exists, it will be overwritten by the new file

 

Delete file

Use this to delete any local file on the device. The command will not fail if the file doesn’t exist or can’t be deleted!

Example: We delete the original version of the copied file

 

Install app

With this command, you can install any app from a local or remote apk file.
For remote files, only http and https is supported. A remote file will be downloaded first so please ensure a necessary connection before this command.

For a list of all supported URL schemes, see here.

Example: We install an app from a server. (This will download the file to a temporary location before installing it)

 

App permissions

This command enables you to grant or revoke any permission from an app. This is the same as changing Settings > App > (your app) > Permissions.
An app will usually ask for it’s required permissions on demand or when it’s launched for the first time. With this, you can grant those permissions beforehand.

Example: We allow the app with the package name “com.handheldgroup.someapp” to read the phone contacts

 

Homescreen shortcut

Add any app to the home screen. This must be supported by the launcher app and will cause an error otherwise!
To find the package name of an app, you can use a tool like List My Apps.

Example: Add Chrome to the home screen

 

Set as home

If you install any kind of home/launcher replacement, you can set that app as the default launcher with this command.
Make sure to provide the full classpath to the launcher activity.

Example: We set the launcher app of the KioskHome as the default home/launcher app

 

Set wallpaper

With this command, you can set any local image file as the wallpaper. Make sure to provide an existing local path to an supported image.

Example: We set the downloaded image as the wallpaper

 

Create APN

This function allows you to create an APN. Make sure to check the “Set this APN as preferred” option at the bottom to actually enable this APN.
Most standard provider APNs are already included in the system and should appear as soon as a SIM card is inserted. You’ll only have to use this commands if you need a special APN for your use case.

 

Intent

This command allows you to start an Activity (by calling startActivity) using an Intent (classpath) or Action. You can provide a set of extras to pass to the activity as well.
You can use this to trigger an action or initialization in your app.
Make sure that the called Activity does actually exit after it’s done because the staging will hold until the activity stops.

When starting an Activity, there are three possible ways to provide the “Intent value”:

  • The full class path to the activity you want to start – e.g. “com.android.chrome/com.google.android.apps.chrome.Main” for Chrome
  • The package name suffixed by a slash to start the default/launcher activity inside that app – e.g. “com.android.chrome/” for Chrome
  • A intent action to start any app associated with that action – e.g. “android.intent.action.VIEW” to view a element. If you sent the data to a URI, this can also open Chrome

To set the data element in the intent, add a string extra an use the special value “__DATA” as the key for this extra

You can also use intent commands to apply settings to other handheld and MaxGo app. See here for details and supported apps.

 

Internal Script

This allows you to run a predefined set of internal commands. This is built from other commands and is mostly used to keep the total size of the export smaller.

Example: We run the necessary steps to set up the KioskHome app. Make sure to only run this AFTER installing the app

 

Install handheld app

This will automatically download and install the latest version of the selected app for the device.
Please note that some of our apps might not be available for all devices. The command will fail with an error if no match is found.

Example: We install the latest version of the KioskHome app

 

Appops settings

With this command, you can run “appops” commands granting your apps special permissions that usually must be allowed by the user manually.
This includes settings like “Change system settings” or “Draw over other apps”.

Example: We allow the app with the package name “com.handheldgroup.someapp” to draw over other apps

 

Package Manager

This command allows you to call the package manager and allows you to uninstall, hide or reset installed apps.
Please note that uninstalling system apps will fail. For a similar result, you can use “hide”.
To find the package name of an app, you can use a tool like List My Apps.

Example: Hide the pre-installed Chrome browser (package name “com.android.chrome”) so the user can’t open it anymore

 

Language

Use this command to change the system language and region of your device.

Example: Change the language to German and the region to Germany

 

Self-update

This command triggers an update check for the staging app.
If you want to run this check before any other commands, you can also use the option in the project settings. Running this command at a later time is useful if you need to set up an internet connection first.

 

NTP Server

This command allows you to change the time server that Android will use to query the current time and date. This is only useful if your network doesn’t allow access to the default Android time server.
If the device has a cellular connection, it will also try to pull the date information from that network and will usually prefer that information to the NTP server.

 

Placeholders

You can use various placeholders to provide details about the device on remote calls and to define device independent paths for download.

 

Key Name Note
%temp% Temp folder Temp / Cache folder on the device. Ideal location for files that you don’t need anymore after staging is done
%sdcard% Internal storage Internal storage folder on the device. Ideal location for files that should be accessible to other apps or will be needed after staging
%ext-sdcard% Removable SD card Path to a removable SD card. If none is present, the internal %sdcard% path is returned
%hw-model% Device model name Name of the device hardware/product
%hw-os% Device OS version Current Android OS version / SDK level
%hw-version% Device OS version Current OS build version as shown in Settings > About
%hw-sn$ Device Unit S/N Unit serial number. Some devices can have two serial numbers. This will always return the S/N used on the label and box
%sn% Device S/N Device serial number
%version% App Version Current Version of the Staging app
%version-code% App Version code Current numerical version code of the Staging app
%_t% Timestamp Current time as a timestamp. Useful to prevent caching
%imei% IMEI The primary IMEI number. On dual-sim devices, this is likely for slot 1
%meid% MEID The primary MEID number. On dual-sim devices, this is libely for slot 1. (Requiest at least Android 8)
%imei1% IMEI Slot 1 The IMEI for SIM slot 1
%imei2% IMEI Slot 2 The IMEI for SIM slot 2
%meid1% MEID Slot 1 The MEID for SIM slot 1
%meid2% MEID Slot 2 The MEID for SIM slot 2

Supported URL formats

Any command taking a URL (download, install, remote-script, etc) supports the following schemes:

http

https://www.example.com/path/to/file.apk will perform a HTTP or HTTPS GET request to the URL.
You can change the port by passing “:4200” after the host. Authentification is not supported.

ftp

ftp://user:password@example.com/path/to/file.apk will login to the FTP server and try to download the file at the given path.
If user and password is omitted, an “anonymous” login is performed. You can change the port by passing “:4200” after the host.

Format is ftp(s)://[user[:password]]@server[:port]/path/to/file.ext

smb (Samba / Windows Network Share)

smb://user:password@server/path/to/file.ext will try to access the network share on “server” with the provided login.

Format is smb://[domain]user[:password]@server/path/to/file.ext

Export Formats

This tool provides several ways to export a project.

Export as barcode

This will open a new window with one or more Datamatrix 2D barcodes which contain all the commands. You can read those barcodes using the camera or 2D scanner on a device.

Export as remote script

This will download a JSON file containing the commands. You can place this on your server and trigger it from a different set of commands. This allows you to reduce the size of the initial barcode and to modify the commands on your server depending on the request parameters like the device model or serial number.

Export as binary

This will download a bin file containing the commands in a compressed format. You can use this file to write the commands to an NFC tag with the TagWriter App.

Export as project file

This will download an hsp file containing the commands and some metadata. You can use this file to import the same project on a different PC or browser.

TagWriter App

This helper app enables you to write the exported bin file to an NFC tag.
Get it on Google Play
You can also download the latest version of the apk from here.

How to use

Download the app from the link above and install it on any Android device with NFC support

There are two ways to use this app. The first one is to scan the exported barcodes with the TagWriter and the 2nd option is to export a binary (raw) file and transfer that to the device.

Scan barcode

  1. Open the TagWriter app
  2. Tap the “Scan Barcode” button
  3. If you do this for the first time, the app will ask for permission to access the camera. You must allow this to continue
  4. Use the camera to scan all barcodes in your export. Once this is done, the app will return to the main screen
  5. Tap the “Write tag” button
  6. Hold the tag near the back of the device when prompted
  7. You’ll see a message once the tag has been written

Use a file export

  1. Export the project you want to use as a binary (raw) file
  2. Copy the .bin file to the Android device
  3. Open the Tag Writer app
  4. Tap the […] button to select the .bin file
  5. When you do this for the first time, the app will ask for permission to access files on the device. You must allow this to continue
  6. If the file is okay, you’ll see the “Write tag” button. Otherwise, you’ll see an error message
  7. Tap the “Write tag” button
  8. Hold the tag near the back of the device when prompted
  9. You’ll see a message once the tag has been written

 

Once a tag is created, you can use it on as many devices as you like.