RxLogger APIs

RxLogger 13.0

Overview

The functionality of RxLogger can be controlled using Android intents within a third-party application.


Enable RxLogger

Begins data collection for all enabled modules; the equivalent of tapping the Start button. Special instructions apply when RxLogger is operated in Secure Mode.

Intent:

    com.symbol.rxlogger.intent.action.ENABLE

Secure Mode

To enable RxLogger in Secure Mode, use one of the following methods:

  • Enable RxLogger via shell command:

    com.symbol.rxlogger.intent.action.ENABLE_SHELL
    
  • Enable RxLogger via third-party app:

    com.symbol.rxlogger.intent.action.ENABLE -e "token" "<token-id>"
    

    A token must be passed as an extra in the intent. Replace <token-id> with the token obtained, see Third-Party App Token Request.


Disable RxLogger

Stops data collection for all modules; the equivalent of tapping the Stop button. Special instructions apply when RxLogger is operated in Secure Mode.

Intent:

    com.symbol.rxlogger.intent.action.DISABLE

Secure Mode

To disable RxLogger in Secure Mode, use one of the following methods:

  • Disable RxLogger via shell command:

    com.symbol.rxlogger.intent.action.DISABLE_SHELL
    
  • Disable RxLogger via third-party app:

    com.symbol.rxlogger.intent.action.DISABLE -e "token" "<token-id>"
    

    A token must be passed as an extra in the intent. Replace <token-id> with the token obtained, see Third-Party App Token Request.


Refresh Config

Updates RxLogger with new configuration settings when an updated config.json file is deployed. This restarts RxLogger and applies the new settings.

Note: This intent will be deprecated in Android 14 and will be obsolete starting from Android 15.

Intent:

    com.symbol.dd.intent.action.REFRESH_CONFIG_ACTION

BackupNow

Triggers a backup for the current files in the RxLogger folder. These files are compressed into a zip file, following the naming convention Backup-<date>-<HHMMSS>.zip. Special instructions apply when RxLogger is operated in Secure Mode.

    com.symbol.rxlogger.intent.action.BACKUP_NOW

Secure Mode

To trigger a backup in secure mode, use one of the following methods:

  • BackupNow via shell command:

    com.symbol.rxlogger.intent.action.BACKUP_NOW_SHELL  -e "password" "<password>"
    
  • BackupNow via third-party app:

    com.symbol.rxlogger.intent.action.BACKUP_NOW -e "token" "<token-id>" -e "password" "<password>"
    

    A token must be passed as an extra in the intent. Replace <token-id> with the token obtained, see Third-Party App Token Request.


Error Logging

In the event of a failure with remote intents while in Secure Mode, information about the error can be found in the RxError.txt file. This file is located in either of the following folders:

  • Internal storage path: /sdcard/RxLogger/
  • External storage path: /storage/<UUID>/RxLogger/ (where <UUID> is the device's unique identifier)

The error details may include when the remote intent failed to start, stop, or backup RxLogger.


Third-Party Token Request

When secure mode is activated, any third-party app trying to start/stop RxLogger or trigger a backup via intent must include a token as an extra within the intent. This token is obtained via any of the following methods:

  • Zebra Device Manager with delegation scope
    • The keys for the token and password are “token” and “password” respectively.
    • The delegation scope is delegation-zebra-com-symbol-secure-rxlogger.
  • Access Manager in StageNow:
    • The package name, signature and service identifier (for Android 13 or higher: delegation-zebra-com-symbol-secure-rxlogger) must be granted access through Service Access Action.

Follow this procedure to request the token and send an intent with the token as an extra:

  1. Download the library BroadcastProtectionLibrary.aar and import it into your application project.

    import com.zebra.security.broadcastprotection.BroadCastAuthenticator;
    
  2. Instantiate BroadCastAuthenticator() in your activity, fragment or service.

    BroadCastAuthenticator vIntentprotect=new BroadCastAuthenticator();
    
  3. Add the following code in the onCreate() method:

    vIntentprotect.initialize(getApplicationContext());
    
  4. If your application needs to request a token, call the getToken() API:

    String token=vIntentprotect.getToken("delegation-zebra-com-symbol-secure-rxlogger");
    
  5. Send the required intent along with the token as extras:

    Intent intent = new Intent();
    intent.setAction("<specify_intent>");
    intent.putExtra("token", token);
    sendBroadcast(intent);
    

    Replace <specify_intent> with the intent to send, e.g. com.symbol.rxlogger.intent.action.ENABLE or com.symbol.rxlogger.intent.action.BACKUP_NOW.

  6. Add the following code in the onDestroy() method:

    vIntentprotect.terminate();