Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can now provide these selections via a configuration file or launch intent extras.

Table of Contents

Settings format

The settings are provided in a JSON format.

The supported parameters are:

Parameter

Description

Supported since client version

name

Settings name. This may be shown to the user in the confirmation dialog. It should be a very short description of what the settings are for, so that the user can quickly determine if they are correct.

5.2.0

installationCode

The installation code.

5.2.0

serviceUrl

The service URL. This is usually in the format "https://{domain}/rest/api"

5.2.0

skipConfirmation

If true, user is not asked to confirm the activation of these settings. Otherwise, user will be shown a dialog where they must confirm the activation.

5.2.0

Installation code and service URL are required values to start activation.

Example
Code Block
languagejstitleExample
{
    'name': 'Name for settings',
    'installationCode': '12345',
    'serviceUrl': 'https://mysync.example.com/rest/api',
    'skipConfirmation': false
}

...

If the app has somehow been granted the permission to access device storage, it is able to read configuration files from the following locations:

Location

Supported since client version

/sdcard/mysync.json

(same directory as returned by Environment.getExternalStorageDirectory())

5.2.0

/enterprise/usr/mysync.json

5.2.0

Via launch intent

The JSON can be provided via an Intent. The intent should target the MainActivity class, and the extra activation_settings should contain the JSON as string value. For example:

Intent example
example
Code Block
title
languagejava
Intent
Intent intent = new Intent();
intent.setClassName("eu.mysync.android.dm", "eu.mysync.android.dm.activity.MainActivity");
intent.putExtra("activation_settings", "{'name':'Example settings','installationCode':'12345','serviceUrl':'https://mysync.example.com/rest/api', 'skipConfirmation':false}");
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);

If you are using Zebra Technologies' StageNow, you can create an Intent and enter the values like this

...

:

...

Action name can be anything (StageNow requires a value), value does not matter. JSON can be written on a single line

...

Image Removed.