### Install and Start Application using EMDK for Android Source: https://techdocs.zebra.com/emdk-for-android/13-0/mx/appgallerymgr This snippet shows how to install an application and then start it. It uses the AppMgr characteristic for installation and the Intent characteristic to launch the main activity. ```xml ``` -------------------------------- ### EMDKConfig.xml Example Source: https://techdocs.zebra.com/emdk-for-android/13-0/guide/xmlresponseguide An example XML configuration file for EMDK, demonstrating how to define profiles for device settings like Clock. ```APIDOC ## EMDK Configuration XML Example ### Description This XML file demonstrates the structure for creating a profile named 'ClockProfile-1' which configures clock settings on a Zebra device using EMDK. ### Method N/A (XML Configuration) ### Endpoint N/A (Local Configuration File) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```xml ``` ### Response N/A (Configuration File) ``` -------------------------------- ### Silently Install Application (XML) Source: https://techdocs.zebra.com/emdk-for-android/13-0/mx/appgallerymgr This XML snippet demonstrates how to silently install an application (APK file) from a specified path on the device. The Action is set to 'Install', and the 'APK' parameter specifies the path to the APK file. This example installs 'Clock.apk' from '/enterprise/usr/persist/'. ```xml ``` -------------------------------- ### Get Status of 'Install Apps from Unknown Sources' Source: https://techdocs.zebra.com/emdk-for-android/13-0/mx/devadmin This snippet demonstrates how to query the status of the 'Install Apps from Unknown Sources' setting. The input XML requests the 'UnknownSourcesStatus' parameter from the 'DevAdmin' characteristic. The output XML shows the current value. ```xml ``` -------------------------------- ### Get Key List Source: https://techdocs.zebra.com/emdk-for-android/13-0/mx/encryptmgr Retrieves a list of available encryption keys. No specific details or examples were provided in the input text. ```APIDOC ## Get Key List ### Description Retrieves a list of available encryption keys. The specific method and response format are not detailed in the provided documentation. ### Method GET (implied) ### Endpoint (Not explicitly defined) ### Parameters (Not specified) ### Request Example (Not specified) ### Response (Not specified) ``` -------------------------------- ### XML Output for EncryptMgr Key Installation Details Source: https://techdocs.zebra.com/emdk-for-android/13-0/mx/encryptmgr This XML snippet illustrates the output structure after a key installation is processed by the EncryptMgr. It includes parameters for the installation action and details of the installed key, such as its name. ```xml ``` -------------------------------- ### EMDK Profile XML Example Source: https://techdocs.zebra.com/emdk-for-android/13-0/guide/xmlresponseguide This is a sample EMDKConfig.xml file generated by the Profile Manager Wizard. It demonstrates the structure for configuring various device features like AccessMgr, RemoteScannerMgr, AppMgr, PowerMgr, and Clock. ```xml ``` -------------------------------- ### Android UI Element References and Button Listener Setup Source: https://techdocs.zebra.com/emdk-for-android/13-0/tutorial/tutMxPowerManager This snippet shows how to get references to UI elements like TextView, RadioGroup, and EditText in an Android Activity's onCreate method. It also demonstrates setting up an OnClickListener for a Button to trigger a power management operation. ```java // References of the UI elements statusTextView = (TextView) findViewById(R.id.textViewStatus); pwrRadioGroup = (RadioGroup) findViewById(R.id.radioGroupPwr); zipFilePathEditText = (EditText) findViewById(R.id.et_zip_file_path); // Set on Click listener to the set button to execute Power Manager // operations addSetButtonListener(); ``` -------------------------------- ### Get Newly Connected Scanner Example Source: https://techdocs.zebra.com/emdk-for-android/13-0/guide/extended_scanner_parameters Example code demonstrating how to access a newly available scanner using device enumeration. ```APIDOC ## Example: Get Newly Connected Scanner ### Description This code segment shows how to access a newly available scanner using device enumeration when scanners are not immediately available for selection by device identifiers. ### Method GET ### Endpoint /barcode/devices ### Parameters None ### Request Example ```java List supportedDevList = barcodeManager.getSupportedDevicesInfo(); Scanner scanner = null; Iterator it = supportedDevList.iterator(); while(it.hasNext()) { ScannerInfo scnInfo = it.next(); if(scnInfo.getFriendlyName().toUpperCase().contains("RS6000")) { scanner = barcodeManager.getDevice(scnInfo); break; } } ``` ### Response #### Success Response (200) - Returns a `Scanner` object if a matching device is found and acquired. #### Response Example ```java // Scanner object representing the acquired device ``` ### Notes - Use `BarcodeManager.getSupportedDevicesInfo()` to get a list of available scanners. - Pass a `ScannerInfo` object obtained from the list to `BarcodeManager.getDevice()` to acquire the scanner. - If the scanner is not available by device identifier, try filtering by friendly name, class, or scanner type. - The device index can also be passed to the `getDevice` method. ``` -------------------------------- ### Install Client Certificate and Private Key (.PFX) Source: https://techdocs.zebra.com/emdk-for-android/13-0/mx/wifi Configures the device to install a client certificate and private key from a .PFX file. This involves specifying the certificate alias, type, method, file path, and password. Ensure the certificate file is accessible on the device. ```xml ``` -------------------------------- ### Get SAM Type and Index Source: https://techdocs.zebra.com/emdk-for-android/13-0/guide/samapiusage Retrieves the type of the connected SAM (e.g., MIFARE, CALYPSO, FELICA) and its slot index on the device. The index starts from 1. ```java SAMType samType = sam.getSamType(); int index = sam.getSamIndex(); ``` -------------------------------- ### EMDK Feature Characteristic Example (AppMgr) Source: https://techdocs.zebra.com/emdk-for-android/13-0/guide/xmlresponseguide This is an example of a feature characteristic node within a profile, specifically for the AppMgr (Application Manager). It defines settings for installing an APK, including the unique emdk_name, action, and the APK path. The emdk_name is used by the Profile Manager API to identify the feature. ```xml ``` -------------------------------- ### OS Update '.upl' File Example Source: https://techdocs.zebra.com/emdk-for-android/13-0/mx/powermgr This snippet demonstrates the format of an OS Update '.upl' text file, which lists multiple '.zip' files to be applied sequentially for device updates. Each package file name must be preceded by 'package:'. ```text //Contents of the "osupdate.upl" text file: package:M99N0KXXVPUCP14500.zip package:CFE-M99-L-N0-010101_G_00_02.zip // Note that package file names are preceded by the notation "package:" ``` -------------------------------- ### Get Image Data from Byte Array (Java) Source: https://techdocs.zebra.com/emdk-for-android/13-0/guide/signaturecapture Extracts image data from a larger byte array. This function uses `Arrays.copyOfRange` to retrieve a portion of the byte array, assuming image data starts at a specific offset. ```Java byte[] sigDataArr //holds the total signature data byte array byte[] imgDataArr = Arrays.copyOfRange(sigDataArr, 6, sigDataArr.length); ``` -------------------------------- ### Handle EMDKManager Initialization and Scanner Setup - Java Source: https://techdocs.zebra.com/emdk-for-android/13-0/tutorial/tutbasicscanningapi This snippet shows how to obtain a reference to the EMDKManager upon successful opening of the EMDK. It then proceeds to initialize the BarcodeManager and the scanner using the obtained EMDKManager instance. ```java // Get a reference to EMDKManager this.emdkManager = emdkManager; // Get a reference to the BarcodeManager feature object initBarcodeManager(); // Initialize the scanner initScanner(); ``` -------------------------------- ### Full Serial Communication Example (Java) Source: https://techdocs.zebra.com/emdk-for-android/13-0/guide/serialcomm Demonstrates obtaining the SerialCommManager, enumerating, getting, configuring, and writing to a serial port using the EMDK for Android. It also covers enabling and disabling the serial port, and releasing resources when finished. ```Java public class MainActivity extends Activity implements EMDKListener { SerialComm serialComm; SerialCommManager serialCommManager; EMDKManager emdkManager; private String TAG = MainActivity.class.getSimpleName(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // // Get the EMDK manager: EMDKResults results = EMDKManager.getEMDKManager(getApplicationContext(), this); } @Override public void onOpened(EMDKManager emdkManager) { this.emdkManager = emdkManager; Log.d(TAG, "EMDK Opened and ready to use."); // // Get the serialCommManager instance: serialCommManager = (SerialCommManager) this.emdkManager.getInstance(FEATURE_TYPE.SERIALCOMM_EX); try { //... // Note: For most devices, this method (below) will return only one port. // On the VC80, this could return two or more ports. // // Get the list of supported ports on the device. List serialPorts = serialCommManager.getSupportedPorts(); // // Get the serialComm/port object by passing a SerialPortInfo object: serialComm = serialCommManager.getPort(serialPorts.get(0)); //... // // Enable the serial port: serialComm.enable(); // // Get the supported configuration for the serial port: SerialCommConfig config = serialComm.getConfig(); config.baudRate = SerialCommConfig.BaudRates.BR_9600; // Set baud rate config.dataBit = SerialCommConfig.DataBits.EIGHT; // Set dataBit config.parity = SerialCommConfig.ParityBits.EVEN; // Set parity config.stopBit = SerialCommConfig.StopBits.ONE; // Set stopBit config.flowControlMode = SerialCommConfig.FlowControlMode.RTS_CTS; // Set flow control serialComm.setConfig(config); // Set the configuration for the port //... String writeData = "Text to write"; // // Write the data in writeData object to serial port: int bytesWritten = serialComm.write(writeData.getBytes(), writeData.getBytes().length); //... // // Disable the serial port after using: serialComm.disable(); //... // // Release the serialCommManager after using: emdkManager.release(FEATURE_TYPE.SERIALCOMM_EX); } catch (Exception ex) { } } @Override public void onDestroy() { if(this.emdkManager != null) { this.emdkManager.release(); this.emdkManager = null; } super.onDestroy(); } @Override public void onClosed() { if(this.emdkManager != null) { this.emdkManager.release(); } Log.d(TAG, "EMDK closed"); } } ``` -------------------------------- ### Install Client Certificate and Private Key (.P12) Source: https://techdocs.zebra.com/emdk-for-android/13-0/mx/wifi Configures the device to install a client certificate and private key from a .P12 file. This XML snippet defines the certificate alias, type, method, file path, and password required for installation. Ensure the .P12 file is correctly formatted and accessible. ```xml ``` -------------------------------- ### Set Remote Trigger Status Example Source: https://techdocs.zebra.com/emdk-for-android/13-0/guide/extended_scanner_parameters Example code demonstrating how to set the `remote_trigger_status` parameter. ```APIDOC ## Example: Set Remote Trigger Status ### Description This code segment shows how to set the value of the `remote_trigger_status` parameter using the scanner parameter configuration APIs. ### Method POST ### Endpoint /scanner/params ### Parameters #### Request Body - **parameters** (Bundle) - Required - Bundle containing parameter names and values. - **remote_trigger_status** (String) - Required - '0' to Disable, '1' to Enable. ### Request Example ```json { "parameters": { "remote_trigger_status": "0" } } ``` ### Response #### Success Response (200) - Indicates successful update of the parameter. #### Response Example ```json { "status": "success" } ``` ### Notes - Parameter names must match those from the supported parameter list. - Ensure the scanner is Enabled to receive trigger press notifications. ``` -------------------------------- ### Install Client Certificate (.PEM) (XML Provisioning) Source: https://techdocs.zebra.com/emdk-for-android/13-0/mx/wifi Installs a client certificate in PEM format using XML provisioning. This configuration includes the certificate alias, type, method, file path, and clock adjustment settings. ```XML ``` -------------------------------- ### Starting and Canceling Scans Source: https://techdocs.zebra.com/emdk-for-android/13-0/guide/simulscan_guide Initiates a scan using `read()` and can be canceled using `cancelRead()`. Checks if a read is pending before starting a new one. ```APIDOC ## Starting and Canceling Scans ### Description After setting a template, you can start a scan using the `SimulScanReader.read()` API. A read request can be canceled by issuing `cancelRead()`. If a `read()` is submitted while another read is pending, the method call will fail. It is recommended to check whether a read is pending by calling `isReadPending()` before submitting a `read()`. ### Method `read()`, `cancelRead()`, `isReadPending()` ### Endpoint N/A (Java API) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java // Check if reader is enabled before starting scan try { if(!selectedSimulScanReader.isEnabled()) selectedSimulScanReader.enable(); } catch (SimulScanException e) { e.printStackTrace(); } // Start a read if no read is pending if (!selectedSimulScanReader.isReadPending()) { try { selectedSimulScanReader.read(); } catch (SimulScanException e) { e.printStackTrace(); } } // Cancel a pending read try { if(selectedSimulScanReader.isReadPending()){ selectedSimulScanReader.cancelRead(); } } catch (SimulScanException e) { e.printStackTrace(); } ``` ### Response #### Success Response (N/A for scan start/cancel) N/A #### Response Example N/A ``` -------------------------------- ### Complete Android Manifest for EMDK Integration Source: https://techdocs.zebra.com/emdk-for-android/13-0/tutorial/tutmxpowermanager This example shows a complete Manifest.xml configuration incorporating both the EMDK permission and the EMDK library. Ensure these additions are correctly placed within your manifest file for successful EMDK integration. ```xml ... ``` -------------------------------- ### EMDKManager Initialization and Release Source: https://techdocs.zebra.com/emdk-for-android/13-0/index Guidance on implementing `EMDKListener`, handling `onOpened()`, and managing `EMDKManager` lifecycle. ```APIDOC ## EMDKManager Lifecycle ### Description Details on correctly implementing `EMDKListener`, waiting for `onOpened()`, and managing the `EMDKManager` object's lifecycle, including release calls. ### Method N/A (Describes API behavior, not a specific HTTP endpoint) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) N/A #### Response Example N/A ### Notes - Implement `EMDKListener` and wait for `onOpened()` before making API calls. - Before calling APIs in `onResume()`, check `EMDKManager` status to avoid null pointer exceptions if `onResume()` is called before `onOpened()`. - `EMDKManager.release()` without a feature type argument releases all resources. Call this **only before exiting the application**, preferably in `onDestroy()`. ``` -------------------------------- ### Personal Shopper Feature - Instance Initialization Source: https://techdocs.zebra.com/emdk-for-android/13-0/guide/personalshopper Shows how to create an instance of the Personal Shopper feature class using the EMDKManager. ```APIDOC ## Initialize PersonalShopper Instance ### Description Create an instance of the personal shopper feature class to utilize its functionalities. ### Method `getInstance(FEATURE_TYPE.PERSONALSHOPPER)` ### Endpoint N/A (This is a method call on an EMDKManager instance) ### Parameters #### Query Parameters - **FEATURE_TYPE.PERSONALSHOPPER** (Enum) - Required - Specifies the feature type to instantiate. ### Request Body N/A ### Request Example ```java PersonalShopper personalShopper = (PersonalShopper)this.emdkManager.getInstance(FEATURE_TYPE.PERSONALSHOPPER); if(personalShopper == null) { // This feature is not supported on the device in use. } ``` ### Response - **personalShopper** (PersonalShopper) - An instance of the PersonalShopper class if supported, otherwise null. ``` -------------------------------- ### Install Client Certificate and Private Key (.PKCS12) Source: https://techdocs.zebra.com/emdk-for-android/13-0/mx/wifi This XML configuration installs a client certificate and private key using the .PKCS12 format. It specifies the certificate alias, type, method, file path, and password. The 'CertType' is set to 9 and 'CertMethod' to 10 for PKCS12 files. ```xml ``` -------------------------------- ### Get SimulScanReader using INTERNAL_CAMERA1 Identifier Source: https://techdocs.zebra.com/emdk-for-android/13-0/guide/simulscan_guide This code demonstrates how to get a SimulScanReader instance using the INTERNAL_CAMERA1 identifier. If the identifier is not valid for the target platform, a SimulScanException will be thrown. Error handling is included. ```Java try { simulscanManager.getDevice(SimulScanDeviceIdentifier.INTERNAL_CAMERA1); } catch (SimulScanException e) { e.printStackTrace(); } ``` -------------------------------- ### Initialize Android KeyStore with Password (XML Provisioning) Source: https://techdocs.zebra.com/emdk-for-android/13-0/mx/wifi Initializes the Android KeyStore with a specified password, required for secure certificate installation. This method uses XML provisioning. ```XML ``` -------------------------------- ### Get Barcode Manager Instance (Java) Source: https://techdocs.zebra.com/emdk-for-android/13-0/guide/barcode_scanning_guide This code snippet demonstrates how to obtain an instance of the BarcodeManager from the EMDKManager. The BarcodeManager is essential for accessing scanner devices. Ensure EMDK is opened before attempting to get the instance. ```java BarcodeManager barcodeManager = (BarcodeManager)emdkManager.getInstance(FEATURE_TYPE.BARCODE); ``` -------------------------------- ### Encrypt SD Card Example Source: https://techdocs.zebra.com/emdk-for-android/13-0/mx/encryptmgr Example XML for activating Full Storage Card Encryption using a specified key. ```APIDOC ## Encrypt SD Card Example ### Description This example demonstrates how to activate Full Storage Card Encryption and set the encryption key using provisioning XML. ### Method POST (implied by provisioning XML) ### Endpoint (Not explicitly defined, part of provisioning XML) ### Request Example ```xml ``` ### Response (Not explicitly defined, success/failure indicated by overall provisioning result) ``` -------------------------------- ### Get Scanner by Device Identifier (Java) Source: https://techdocs.zebra.com/emdk-for-android/13-0/guide/barcode_scanning_guide This snippet shows how to get a specific scanner instance using a DeviceIdentifier, such as BLUETOOTH_IMAGER_RS6000. This method is useful when the specific device is known and enumeration is not required. It returns null if the identifier is not supported. ```java Scanner scanner = barcodeManager.getDevice(DeviceIdentifier.BLUETOOTH_IMAGER_RS6000); ``` -------------------------------- ### Getting Notification Device Source: https://techdocs.zebra.com/emdk-for-android/13-0/guide/notification-api You can get a NotificationDevice object either by using a predefined DeviceIdentifier or by enumerating supported devices and selecting one based on its DeviceInfo. This allows you to access specific notification hardware like the RS6000 or External Vibrator. ```APIDOC ## Getting Notification Device ### Description Retrieve a NotificationDevice object to control specific notification hardware. You have two primary methods: using a direct `DeviceIdentifier` or enumerating available devices and selecting one via `DeviceInfo`. ### Method 1: Using DeviceIdentifier #### Description Use the `NotificationManager.getDevice(DeviceIdentifier deviceIdentifier)` API with a specific identifier to get the desired notification device. This is a direct approach when you know the exact device you need. #### Device Identifiers - `BLUETOOTH_IMAGER_RS6000`: For the Ring Scanner "RS6000". - `EXTERNAL_VIBRATOR1`: For the pluggable External Vibrator. #### Note If the specified `DeviceIdentifier` is not supported on the target platform, the `getDevice` call will return `null`. #### Code Example ```java NotificationDevice notificationDevice = notificationManager.getDevice(DeviceIdentifier.BLUETOOTH_IMAGER_RS6000); ``` ### Method 2: Using DeviceInfo from Device Enumeration #### Description First, obtain a list of supported devices using `NotificationManager.getSupportedDevicesInfo()`. Then, iterate through this list and use the `NotificationManager.getDevice(DeviceInfo deviceInfo)` API with a chosen `DeviceInfo` object. #### Code Example ```java List supportedDevList = notificationManager.getSupportedDevicesInfo(); NotificationDevice notificationObject = null; Iterator it = supportedDevList.iterator(); while(it.hasNext()) { DeviceInfo devInfo = it.next(); if(devInfo.getConnectionType()==BLUETOOTH_SSI&&devInfo.getDeviceType()==IMAGER){ notificationObject = notificationManager.getDevice(devInfo); break; } } ``` ``` -------------------------------- ### Android EMDK Initialization and Listener Setup Source: https://techdocs.zebra.com/emdk-for-android/13-0/tutorial/tutApplyProfileSilently This snippet shows the necessary imports for the Zebra EMDK and how to extend an Android Activity to implement the EMDKListener interface. This is crucial for receiving callbacks when the EMDK is ready. ```java import com.symbol.emdk.*; import com.symbol.emdk.EMDKManager.EMDKListener; ``` ```java public class MainActivity extends Activity implements EMDKListener { ``` -------------------------------- ### XML Profile - DataCapture and Non-DataCapture Submission Source: https://techdocs.zebra.com/emdk-for-android/13-0/guide/xmlresponseguide This XML is submitted to provision a profile that includes both DataCapture settings and an AppMgr action to install an APK. It specifies the profile name, application details, and the APK to be installed. This configuration can lead to errors if the APK is not found. ```xml ``` -------------------------------- ### Install Client Certificate and Private Key (.PFX) with EMDK Source: https://techdocs.zebra.com/emdk-for-android/13-0/mx/certmgr This snippet installs a client certificate along with its private key using a .PFX, .P12, or .PKCS12 file. It requires the certificate file, alias, type, and the private key password. ```xml ``` -------------------------------- ### Personal Shopper Feature - EMDKManager Source: https://techdocs.zebra.com/emdk-for-android/13-0/guide/personalshopper Demonstrates how to get an instance of the EMDKManager to access various features supported by the EMDK for Android. ```APIDOC ## Access EMDKManager ### Description Get access to the EMDKManager class to interact with different features supported by the EMDK for Android. ### Method `getEMDKManager` ### Endpoint N/A (This is a class instantiation) ### Request Body N/A ### Request Example ```java EMDKManager emdkManager = EMDKManager.getEMDKManager(getApplicationContext(), this); ``` ### Response N/A ``` -------------------------------- ### Certificate Action API Source: https://techdocs.zebra.com/emdk-for-android/13-0/mx/certmgr This endpoint allows for installing or uninstalling certificates and initializing the Android Keystore. Note that initializing the Android Keystore is not supported on Android 10 and later. ```APIDOC ## POST /certificates/action ### Description Installs, uninstalls a certificate, or initializes the Android Keystore. ### Method POST ### Endpoint /certificates/action ### Parameters #### Request Body - **CertAction** (integer) - Required - Specifies the action to perform: 1 for Install, 2 for Uninstall, 3 for Initialize Keystore. - **CertAlias** (string) - Required - The alias for the certificate. Used for installing and uninstalling. - **Certificate** (string) - Optional - The certificate content (PEM or PKCS12 format) to install. Required when CertAction is 1. - **Password** (string) - Optional - The password for the PKCS12 file. Required if the certificate is a PKCS12 file. ### Request Example ```json { "CertAction": 1, "CertAlias": "my_client_cert", "Certificate": "-----BEGIN CERTIFICATE-----\nMIIDdTCCAl2gAwIBAg...\n-----END CERTIFICATE-----", "Password": "mysecretpassword" } ``` ### Response #### Success Response (200) - **Result** (string) - Indicates the success or failure of the operation. #### Response Example ```json { "Result": "Success" } ``` ``` -------------------------------- ### PersonalShopper Methods Source: https://techdocs.zebra.com/emdk-for-android/13-0/api/reference/index-files/index-7 Methods for accessing cradle information and handling exceptions. ```APIDOC ## PersonalShopper Methods ### Description Methods for retrieving cradle information and handling PersonalShopper related exceptions. ### Method GET ### Endpoint N/A (Methods within CradleInfo and exception classes) ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - **partNumber** (string) - The part number of the cradle. - **result** (enum) - The CradleResults enum value. #### Response Example ```json { "partNumber": "CRD-TC5X-1SLOT", "result": "SUCCESS" } ``` ``` -------------------------------- ### Scanner Parameter Configuration API Source: https://techdocs.zebra.com/emdk-for-android/13-0/guide/extended_scanner_parameters This section covers the core API methods for getting and setting scanner parameters. ```APIDOC ## GET /scanner/params ### Description Gets the current value of the specified parameter available at the scanner. ### Method GET ### Endpoint /scanner/params ### Parameters #### Query Parameters - **parameters** (Bundle) - Required - Bundle containing parameter names to retrieve. ### Request Example ```json { "parameters": { "remote_trigger_status": "" } } ``` ### Response #### Success Response (200) - **parameters** (Bundle) - The current value of the requested parameters. #### Response Example ```json { "parameters": { "remote_trigger_status": "1" } } ``` --- ## POST /scanner/params ### Description Sets the given values to the specified parameters. ### Method POST ### Endpoint /scanner/params ### Parameters #### Request Body - **parameters** (Bundle) - Required - Bundle containing parameter names and their desired values. ### Request Example ```json { "parameters": { "remote_trigger_status": "0" } } ``` ### Response #### Success Response (200) - No content returned on successful update. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### App Manager Actions Source: https://techdocs.zebra.com/emdk-for-android/13-0/mx/appmgr This section details the parameters and actions available for the App Manager API, including options for installing, uninstalling, upgrading, setting default launchers, enabling/disabling applications, and clearing recent apps. ```APIDOC ## App Manager Actions ### Description This API allows for the management of applications on Zebra devices, including installation, uninstallation, upgrades, setting default launchers, enabling/disabling applications, and clearing recent apps. ### Method POST ### Endpoint /websites/techdocs_zebra_emdk-for-android_13-0 ### Parameters #### Query Parameters - **Action** (integer) - Required - Specifies the action to be performed on the application. #### Request Body (Not applicable for this action-based parameter) ### Request Example ```json { "Action": 1 } ``` ### Response #### Success Response (200) - **Result** (string) - Indicates the success or failure of the action. #### Response Example ```json { "Result": "Success" } ``` ## App Manager Action Details ### Parameters #### Query Parameters - **Action** (integer) - Required - Specifies the action to be performed on the application. | Option | Name | Description | Note | Status | Requires | |---|---|---|---|---|---| | 0 | Do nothing | This value (or the absence of this parm from the XML) causes no change to device settings. | | | MX: 4.1+ | | 1 | Install | Installs the user app contained within an .apk file in the specified path on the device. If the requested app cannot be installed, an error is returned in the Result XML document. Note- Attempts to install an app with the same Package Name as one already installed on the device result in an error in the Result XML. To replace an app already installed on the device with a different version with the same Package Name, use the Upgrade action (option 3). | __ | | OSX: 1.0+ MX: 4.2+ | | 2 | Uninstall | Removes the User app with the specified Package Name from the device. If the requested app cannot be found or removed, an error is returned in the Result XML. Note- When an app is removed, data stored in sandbox areas owned by that app also are removed. If the app requiring such data is reinstalled, the data must be recreated. | | | OSX: 1.0+ MX: 4.1+ | | 3 | Upgrade | Upgrades the User app contained within an .apk file in the specified path with the same Package Name on the device. When an app is upgraded, data associated with that app is maintained. If the requested app cannot be found, the selected app is installed on devices running Android 4.x KitKat or later. In devices running Android Jelly Bean, an Upgrade can replace any version of an app with any other version of the same app. In devices running Android 4.x KitKat or later, an Upgrade can replace only apps with a numerically greater version number. | __ | | OSX: 1.0+ MX: 4.1+ | | 4 | SetDefaultLauncher | Sets a System or User app with the specified Package Name as the new default launcher. The specified app must already be installed on the device and generally should be designed to be a Android Launcher according to Android specifications. If no app with the specified Package Name is installed on the device, an error is returned in the Result XML document. | | | OSX: 1.3+ MX: 4.1+ | | 5 | EnableApplication | Enables the System app with the specified Package Name to be launched. If the Package Name does not exist on the device, an error is returned in the Result XML document. | __ | __ | MX: 4.2+ Android API: 1+ | | 6 | DisableApplication | Prevents the System app with the specified Package Name from being launched. If Package Name does not exist on the device, an error is returned in the Result XML document. IMPORTANT: Zebra recommends using the 'System Settings Access' feature of Access Manager to limit or prevent user access to System Settings. | | __ | MX: 4.2+ Android API: 1+ | | 7 | ClearRecentApps | Clears the Android Recent Applications List, which otherwise would allow a user to see and launch recently used apps (Protected Apps excluded. See Note above). | | | MX: 4.2+ Android API: 16+ | ``` -------------------------------- ### Starting and Canceling a Scan with SimulScanReader (Java) Source: https://techdocs.zebra.com/emdk-for-android/13-0/guide/simulscan_guide This code demonstrates how to initiate a scan using `selectedSimulScanReader.read()` and cancel an ongoing read with `cancelRead()`. It's recommended to check `isReadPending()` before starting a new read to avoid errors. The `enable()` method is also called if the reader is not already enabled. ```java try { if(!selectedSimulScanReader.isEnabled()) selectedSimulScanReader.enable(); } catch (SimulScanException e) { e.printStackTrace(); } ``` -------------------------------- ### Install or Upgrade Application Source: https://techdocs.zebra.com/emdk-for-android/13-0/mx/appmgr Installs or upgrades a user application or upgrades a system application using an APK file. Supports App Bundles in .apks, .xapk, or .zip formats for install or upgrade actions. ```APIDOC ## POST /app/install ### Description Installs or upgrades an application using an APK file or an App Bundle. ### Method POST ### Endpoint /app/install ### Parameters #### Query Parameters - **APK** (string) - Required - Full path and name of the device-resident `.apk`, `.apks`, `.xapk` or `.zip` file. (Requires OSX 1.0+, MX 4.2+) #### Request Body ```json { "Action": "Install" | "Upgrade", "Package": "string", "PackageSignature": "string" (Optional) } ``` ### Request Example ```json { "Action": "Install", "Package": "/enterprise/appmgr/Herald.apk" } ``` ### Response #### Success Response (200) - **Result** (string) - Indicates the success or failure of the operation. #### Response Example ```json { "Result": "Success" } ``` ``` -------------------------------- ### Get EMDKManager Instance Source: https://techdocs.zebra.com/emdk-for-android/13-0/guide/personalshopper Obtains an instance of the EMDKManager class, which is the entry point for accessing various features supported by the EMDK for Android. ```java EMDKManager emdkManager = EMDKManager.getEMDKManager(getApplicationContext(), this); ``` -------------------------------- ### Activate License from Local Server (XML) Source: https://techdocs.zebra.com/emdk-for-android/13-0/mx/licensemgr This XML configuration activates a Zebra license using a local server as the license source. It specifies the server URL, activation details, and quantity required for the license. ```XML ``` -------------------------------- ### Get EMDK Version using PackageManager Source: https://techdocs.zebra.com/emdk-for-android/13-0/guide/programming_practices Retrieves the EMDK version name by querying the package manager for the 'com.symbol.emdk.emdkservice' package. Handles PackageManager.NameNotFoundException if the EMDK is not installed. ```java String emdkPkgName = "com.symbol.emdk.emdkservice"; PackageInfo pinfo = getPackageManager().getPackageInfo(emdkPkgName, 0); String emdkVersion = pinfo.versionName; ``` -------------------------------- ### Install CA Certificate (.PEM) (XML Provisioning) Source: https://techdocs.zebra.com/emdk-for-android/13-0/mx/wifi Installs a CA certificate in PEM format using XML provisioning. This includes setting the certificate alias, type, method, file path, and clock adjustment. ```XML ```