When you open the app for the first time, you are sent to the activation activity where you are asked to select how you want to activate the service.
You can now provide these selections via a configuration file or launch intent extras.
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.
{ 'name': 'Name for settings', 'installationCode': '12345', 'serviceUrl': 'https://mysync.example.com/rest/api', 'skipConfirmation': false }
Via configuration file
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 | 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 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: